on master help sign in
Clarify use of `HELIX_RUNTIME` (#4382)
commitfbf8078611abc2fa62856c84b758f2943c00cdec authorGreg Troszak <gdtroszak@gmail.com> dateThu 20 Oct 2022, 20:39 (4 years ago) parent6a0b450
2 files changed+19−3
README.md+9−2 book/src/install.md+10−1
README.md+9−2
@@ -41,7 +41,7 @@ cd helix
4141cargo install --path helix-term
4242```
4343
44−This will install the `hx` binary to `$HOME/.cargo/bin` and build tree-sitter grammars.
44+This will install the `hx` binary to `$HOME/.cargo/bin` and build tree-sitter grammars in `./runtime/grammars`.
4545
4646Helix needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
4747config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
@@ -68,7 +68,14 @@ cd %appdata%\helix
6868mklink /D runtime "<helix-repo>\runtime"
6969```
7070
71−This location can be overridden via the `HELIX_RUNTIME` environment variable.
71+The runtime location can be overridden via the `HELIX_RUNTIME` environment variable.
72+
73+> NOTE: if `HELIX_RUNTIME` is set prior to calling `cargo install --path helix-term`,
74+> tree-sitter grammars will be built in `$HELIX_RUNTIME/grammars`.
75+
76+If you plan on keeping the repo locally, an alternative to copying/symlinking
77+runtime files is to set `HELIX_RUNTIME=/path/to/helix/runtime`
78+(`HELIX_RUNTIME=$PWD/runtime` if you're in the helix repo directory).
7279
7380Packages already solve this for you by wrapping the `hx` binary with a wrapper
7481that sets the variable to the install dir.
book/src/install.md+10−1
@@ -75,7 +75,7 @@ cd helix
7575cargo install --path helix-term
7676```
7777
78−This will install the `hx` binary to `$HOME/.cargo/bin`.
78+This will install the `hx` binary to `$HOME/.cargo/bin` and build tree-sitter grammars in `./runtime/grammars`.
7979
8080Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
8181config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
@@ -103,6 +103,15 @@ cd %appdata%\helix
103103mklink /D runtime "<helix-repo>\runtime"
104104```
105105
106+The runtime location can be overridden via the `HELIX_RUNTIME` environment variable.
107+
108+> NOTE: if `HELIX_RUNTIME` is set prior to calling `cargo install --path helix-term`,
109+> tree-sitter grammars will be built in `$HELIX_RUNTIME/grammars`.
110+
111+If you plan on keeping the repo locally, an alternative to copying/symlinking
112+runtime files is to set `HELIX_RUNTIME=/path/to/helix/runtime`
113+(`HELIX_RUNTIME=$PWD/runtime` if you're in the helix repo directory).
114+
106115To use Helix in desktop environments that supports [XDG desktop menu](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html), including Gnome and KDE, copy the provided `.desktop` file to the correct folder:
107116
108117```bash