6.4 KiB
Installing Helix
- Pre-built binaries
- Linux, macOS, Windows and OpenBSD packaging status
- Linux
- macOS
- Windows
- Building from source
To install Helix, follow the instructions specific to your operating system. Note that:
-
To get the latest nightly version of Helix, you need to build from source.
-
To take full advantage of Helix, install the language servers for your preferred programming languages. See the wiki for instructions.
Pre-built binaries
Download pre-built binaries from the
GitHub Releases page. Add the binary to your system's $PATH
to use it from the command
line.
Linux, macOS, Windows and OpenBSD packaging status
Helix is available for Linux, macOS and Windows via the official repositories listed below.
Linux
The following third party repositories are available:
Ubuntu
Helix is available via Maveonair's PPA:
sudo add-apt-repository ppa:maveonair/helix-editor
sudo apt update
sudo apt install helix
Fedora/RHEL
Helix is available via copr
:
sudo dnf copr enable varlad/helix
sudo dnf install helix
Arch Linux community
Releases are available in the community
repository:
sudo pacman -S helix
Additionally, a helix-git package is available in the AUR, which builds the master branch.
NixOS
Helix is available as a flake in the project
root. Use nix develop
to spin up a reproducible development shell. Outputs are
cached for each push to master using Cachix. The
flake is configured to automatically make use of this cache assuming the user
accepts the new settings on first use.
If you are using a version of Nix without flakes enabled,
install Cachix CLI and use
cachix use helix
to configure Nix to use cached outputs when possible.
macOS
Homebrew Core
brew install helix
Windows
Install on Windows using Scoop, Chocolatey or MSYS2.
Scoop
scoop install helix
Chocolatey
choco install helix
MSYS2
For 64-bit Windows 8.1 or above:
pacman -S mingw-w64-ucrt-x86_64-helix
Building from source
Clone the repository:
git clone https://github.com/helix-editor/helix
cd helix
Compile from source:
cargo install --path helix-term --locked
This command will create the hx
executable and construct the tree-sitter
grammars either in the runtime
folder, or in the folder specified in HELIX_RUNTIME
(as described below). To build the tree-sitter grammars requires a c++ compiler to be installed, for example gcc-c++
.
💡 If you are using the musl-libc instead of glibc the following environment variable must be set during the build to ensure tree-sitter grammars can be loaded correctly:
RUSTFLAGS="-C target-feature=-crt-static"
💡 Tree-sitter grammars can 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).
Configuring Helix's runtime files
- Linux and macOS
Either set the HELIX_RUNTIME
environment variable to point to the runtime files and add it to your ~/.bashrc
or equivalent:
HELIX_RUNTIME=/home/user-name/src/helix/runtime
Or, create a symlink in ~/.config/helix
that links to the source code directory:
ln -s $PWD/runtime ~/.config/helix/runtime
- Windows
Either set the HELIX_RUNTIME
environment variable to point to the runtime files using the Windows setting (search for
Edit environment variables for your account
) or use the setx
command in
Cmd:
setx HELIX_RUNTIME "%userprofile%\source\repos\helix\runtime"
💡
%userprofile%
resolves to your user directory likeC:\Users\Your-Name\
for example.
Or, create a symlink in %appdata%\helix\
that links to the source code directory:
Method | Command |
---|---|
PowerShell | New-Item -ItemType Junction -Target "runtime" -Path "$Env:AppData\helix\runtime" |
Cmd | cd %appdata%\helix mklink /D runtime "%userprofile%\src\helix\runtime" |
💡 On Windows, creating a symbolic link may require running PowerShell or Cmd as an administrator.
Validating the installation
To make sure everything is set up as expected you should run the Helix health check:
hx --health
For more information on the health check results refer to Health check.
Configure the desktop shortcut
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:
cp contrib/Helix.desktop ~/.local/share/applications
cp contrib/helix.png ~/.icons # or ~/.local/share/icons
To use another terminal than the system default, you can modify the .desktop
file. For example, to use kitty
:
sed -i "s|Exec=hx %F|Exec=kitty hx %F|g" ~/.local/share/applications/Helix.desktop
sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop