Input needed on re-write of instructions for installing from source, especially regarding Windows #5490
Replies: 4 comments 6 replies
-
I would emphasize
this part seems unnecessary for me, if the user doesn't know how to deal with Rust they'd probably have a better experience just using a package or the release binaries
Same here, "Clone the repository:" seems enough for me Since the book already covers installation we can also remove that section from the README and leave a link to that page. Similar to how that's done in wezterm: https://github.com/wez/wezterm#installation |
Beta Was this translation helpful? Give feedback.
-
I added the symlink hint for the Windows install instructions. My source for the Windows Vista or later requirement is Microsoft's windows developer blog:
https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/ Since I've never used Windows Vista I can't confirm whether or not this actually is the case. On Windows 10 the symlink command works without issues for me. It did however require elevated privileges on all Windows 10 machines I used, even though the blog says it shouldn't:
|
Beta Was this translation helpful? Give feedback.
-
should we also add why people need the runtime files, specifically that it provides support for highlighting and tree-sitter as well as the tutor (once the help stuff is done we can add that here as well) |
Beta Was this translation helpful? Give feedback.
-
I think the main clarification that I made to the docs was that if I think that could be captured by changing the last sentence of step 2 to something like: "This command will compile and install the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@jdrst @megumish @gdtroszak @NotAgentBilly @matan-h @the-mikedavis (I plucked you out of the commit history, hope you don't mind, everyone is very welcome to comment on this!)
I am working on improving the documentation by rewriting and refactoring it. However, I lack some domain knowledge, particularly for Windows.
The current instructions for installing from source are a mish-mash of different peoples input over time and are extremely hard to follow. I am trying to radically simplify them into clear easy to follow steps, but I might have gone too far. I also may have misunderstood something. Please can people compare the before and after and give me feedback?
CURRENT Docs
Build from source
This will install the
hx
binary to$HOME/.cargo/bin
and build tree-sitter grammars in./runtime/grammars
.Helix also 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). This location can be overridden via theHELIX_RUNTIME
environment variable.xcopy /e /i runtime %AppData%\helix\runtime
xcopy /e /i runtime $Env:AppData\helix\runtime
ln -s $PWD/runtime ~/.config/helix/runtime
Starting with Windows Vista you can also create symbolic links on Windows. Note that this requires elevated privileges - i.e. PowerShell or Cmd must be run as administrator.
PowerShell:
Cmd:
The runtime location can be overridden via the
HELIX_RUNTIME
environment variable.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).To use Helix in desktop environments that supports XDG desktop menu, including Gnome and KDE, copy the provided
.desktop
file to the correct folder:cp contrib/Helix.desktop ~/.local/share/applications
To use another terminal than the default, you will need to modify the
.desktop
file. For example, to usekitty
:NEW Docs (v2, updated 11th Jan)
Building from Source
git clone https://github.com/helix-editor/helix cd helix
This command installs the
hx
binary to~/.cargo/bin
and builds the tree-sitter grammars in./runtime/grammars
.Helix looks by default in the config folder (
~/.config/helix/
on Linux/macOS) to find yourruntime/
folder, and without our intervention Helix will find nothing there. Misconfiguration is a common source of problems, so please pay careful attention to this section.To allow Helix to access the runtime files, which are located in the
.runtime/
directory of your source code folder, you will need to set theHELIX_RUNTIME
environmental variable OR create a symlink of theruntime/
directory to your config folder.To set the
HELIX_RUNTIME
variable, use theHELIX_RUNTIME=/path/to/helix/runtime
format. For example:HELIX_RUNTIME=/home/user-name/src/helix/runtime
. Add this variable to your~/.bashrc
file or equivalent to persist it.To create a symlink, enter the appropriate command for your operating system:
ln -s $PWD/runtime ~/.config/helix/runtime
New-Item -ItemType SymbolicLink -Target "runtime" -Path "$Env:AppData\helix\runtime"
cd %appdata%\helix
mklink /D runtime "<helix-repo>\runtime"
Note: On Windows creating a symbolic link requires elevated privileges - i.e. PowerShell or Cmd must be run as administrator.
If your desktop environment supports the XDG desktop menu, you can configure Helix to show up in the application menu by copying the provided
.desktop
and icon files to their correct folders:To use another terminal than the system default (which is always
gnome-terminal
on Gnome), you can modify the.desktop
file. For example, to usekitty
:Validating the Installation
To make sure everything is set up as expected you should run the helix health check:
For more information on the health check results refer to Health check.
Building tree-sitter grammars
Tree-sitter grammars must be fetched and compiled if not pre-packaged. Fetch grammars with
hx --grammar fetch
(requiresgit
) and compile them withhx --grammar build
(requires a C++ compiler).Beta Was this translation helpful? Give feedback.
All reactions