on master help sign in
Clarify use of `HELIX_RUNTIME` (#4382)
fbf8078Greg Troszak
README.md+9−2
@@ -41,7 +41,7 @@ cd helix
41cargo install --path helix-term
41cargo install --path helix-term
42```
42```
43
43
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`.
45
45
46Helix needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
46Helix needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
47config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
47config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
@@ -68,7 +68,14 @@ cd %appdata%\helix
68mklink /D runtime "<helix-repo>\runtime"
68mklink /D runtime "<helix-repo>\runtime"
69```
69```
70
70
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).
72
79
73Packages already solve this for you by wrapping the `hx` binary with a wrapper
80Packages already solve this for you by wrapping the `hx` binary with a wrapper
74that sets the variable to the install dir.
81that sets the variable to the install dir.
book/src/install.md+10−1
@@ -75,7 +75,7 @@ cd helix
75cargo install --path helix-term
75cargo install --path helix-term
76```
76```
77
77
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`.
79
79
80Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
80Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
81config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
81config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
@@ -103,6 +103,15 @@ cd %appdata%\helix
103mklink /D runtime "<helix-repo>\runtime"
103mklink /D runtime "<helix-repo>\runtime"
104```
104```
105
105
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+
106To 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:
115To 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:
107
116
108```bash
117```bash