From fbf8078611abc2fa62856c84b758f2943c00cdec Mon Sep 17 00:00:00 2001 From: Greg Troszak Date: Thu, 20 Oct 2022 20:39:30 -0400 Subject: Clarify use of `HELIX_RUNTIME` (#4382) --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5847a612..d09bbad5 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ cd helix cargo install --path helix-term ``` -This will install the `hx` binary to `$HOME/.cargo/bin` and build tree-sitter grammars. +This will install the `hx` binary to `$HOME/.cargo/bin` and build tree-sitter grammars in `./runtime/grammars`. Helix needs its runtime files so make sure to copy/symlink the `runtime/` directory into the config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows). @@ -68,7 +68,14 @@ cd %appdata%\helix mklink /D runtime "\runtime" ``` -This location can be overridden via the `HELIX_RUNTIME` environment variable. +The runtime location can be overridden via the `HELIX_RUNTIME` environment variable. + +> NOTE: if `HELIX_RUNTIME` is set prior to calling `cargo install --path helix-term`, +> tree-sitter grammars will be built in `$HELIX_RUNTIME/grammars`. + +If you plan on keeping the repo locally, an alternative to copying/symlinking +runtime files is to set `HELIX_RUNTIME=/path/to/helix/runtime` +(`HELIX_RUNTIME=$PWD/runtime` if you're in the helix repo directory). Packages already solve this for you by wrapping the `hx` binary with a wrapper that sets the variable to the install dir. -- cgit v1.2.3-70-g09d2