<!DOCTYPE HTML>
< html lang = "en" class = "sidebar-visible no-js colibri" >
< head >
<!-- Book generated using mdBook -->
< meta charset = "UTF-8" >
< title > Installation< / title >
<!-- Custom HTML head -->
< meta content = "text/html; charset=utf-8" http-equiv = "Content-Type" >
< meta name = "description" content = "" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< meta name = "theme-color" content = "#ffffff" / >
< link rel = "icon" href = "favicon.svg" >
< link rel = "shortcut icon" href = "favicon.png" >
< link rel = "stylesheet" href = "css/variables.css" >
< link rel = "stylesheet" href = "css/general.css" >
< link rel = "stylesheet" href = "css/chrome.css" >
< link rel = "stylesheet" href = "css/print.css" media = "print" >
<!-- Fonts -->
< link rel = "stylesheet" href = "FontAwesome/css/font-awesome.css" >
< link rel = "preconnect" href = "https://fonts.gstatic.com" >
< link href = "https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;700&display=swap" rel = "stylesheet" >
< link rel = "stylesheet" href = "fonts/fonts.css" >
<!-- Highlight.js Stylesheets -->
< link rel = "stylesheet" href = "highlight.css" >
< link rel = "stylesheet" href = "tomorrow-night.css" >
< link rel = "stylesheet" href = "ayu-highlight.css" >
<!-- Custom theme stylesheets -->
< / head >
< body >
<!-- Provide site root to javascript -->
< script type = "text/javascript" >
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "colibri" : "colibri";
< / script >
<!-- Work around some values being stored in localStorage wrapped in quotes -->
< script type = "text/javascript" >
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') & & theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') & & sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
< / script >
<!-- Set the theme before any content is loaded, prevents flash -->
< script type = "text/javascript" >
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('colibri')
html.classList.add(theme);
html.classList.add('js');
< / script >
<!-- Hide / unhide sidebar before it is displayed -->
< script type = "text/javascript" >
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
< / script >
< nav id = "sidebar" class = "sidebar" aria-label = "Table of contents" >
< div class = "sidebar-scrollbox" >
< ol class = "chapter" > < li class = "chapter-item expanded affix " > < a href = "title-page.html" > Helix< / a > < / li > < li class = "chapter-item expanded " > < a href = "install.html" class = "active" > < strong aria-hidden = "true" > 1.< / strong > Installation< / a > < / li > < li class = "chapter-item expanded " > < a href = "usage.html" > < strong aria-hidden = "true" > 2.< / strong > Usage< / a > < / li > < li > < ol class = "section" > < li class = "chapter-item expanded " > < a href = "keymap.html" > < strong aria-hidden = "true" > 2.1.< / strong > Keymap< / a > < / li > < li class = "chapter-item expanded " > < a href = "commands.html" > < strong aria-hidden = "true" > 2.2.< / strong > Commands< / a > < / li > < li class = "chapter-item expanded " > < a href = "lang-support.html" > < strong aria-hidden = "true" > 2.3.< / strong > Language Support< / a > < / li > < / ol > < / li > < li class = "chapter-item expanded " > < a href = "from-vim.html" > < strong aria-hidden = "true" > 3.< / strong > Migrating from Vim< / a > < / li > < li class = "chapter-item expanded " > < a href = "configuration.html" > < strong aria-hidden = "true" > 4.< / strong > Configuration< / a > < / li > < li > < ol class = "section" > < li class = "chapter-item expanded " > < a href = "themes.html" > < strong aria-hidden = "true" > 4.1.< / strong > Themes< / a > < / li > < li class = "chapter-item expanded " > < a href = "remapping.html" > < strong aria-hidden = "true" > 4.2.< / strong > Key Remapping< / a > < / li > < li class = "chapter-item expanded " > < a href = "languages.html" > < strong aria-hidden = "true" > 4.3.< / strong > Languages< / a > < / li > < / ol > < / li > < li class = "chapter-item expanded " > < a href = "guides/index.html" > < strong aria-hidden = "true" > 5.< / strong > Guides< / a > < / li > < li > < ol class = "section" > < li class = "chapter-item expanded " > < a href = "guides/adding_languages.html" > < strong aria-hidden = "true" > 5.1.< / strong > Adding Languages< / a > < / li > < li class = "chapter-item expanded " > < a href = "guides/textobject.html" > < strong aria-hidden = "true" > 5.2.< / strong > Adding Textobject Queries< / a > < / li > < li class = "chapter-item expanded " > < a href = "guides/indent.html" > < strong aria-hidden = "true" > 5.3.< / strong > Adding Indent Queries< / a > < / li > < / ol > < / li > < / ol >
< / div >
< div id = "sidebar-resize-handle" class = "sidebar-resize-handle" > < / div >
< / nav >
< div id = "page-wrapper" class = "page-wrapper" >
< div class = "page" >
< div id = "menu-bar-hover-placeholder" > < / div >
< div id = "menu-bar" class = "menu-bar sticky bordered" >
< div class = "left-buttons" >
< button id = "sidebar-toggle" class = "icon-button" type = "button" title = "Toggle Table of Contents" aria-label = "Toggle Table of Contents" aria-controls = "sidebar" >
< i class = "fa fa-bars" > < / i >
< / button >
< button id = "theme-toggle" class = "icon-button" type = "button" title = "Change theme" aria-label = "Change theme" aria-haspopup = "true" aria-expanded = "false" aria-controls = "theme-list" >
< i class = "fa fa-paint-brush" > < / i >
< / button >
< ul id = "theme-list" class = "theme-popup" aria-label = "Themes" role = "menu" >
< li role = "none" > < button role = "menuitem" class = "theme" id = "light" > Light< / button > < / li >
< li role = "none" > < button role = "menuitem" class = "theme" id = "rust" > Rust< / button > < / li >
< li role = "none" > < button role = "menuitem" class = "theme" id = "coal" > Coal< / button > < / li >
< li role = "none" > < button role = "menuitem" class = "theme" id = "navy" > Navy< / button > < / li >
< li role = "none" > < button role = "menuitem" class = "theme" id = "ayu" > Ayu< / button > < / li >
< li role = "none" > < button role = "menuitem" class = "theme" id = "colibri" > Colibri (default)< / button > < / li >
< / ul >
< button id = "search-toggle" class = "icon-button" type = "button" title = "Search. (Shortkey: s)" aria-label = "Toggle Searchbar" aria-expanded = "false" aria-keyshortcuts = "S" aria-controls = "searchbar" >
< i class = "fa fa-search" > < / i >
< / button >
< / div >
< h1 class = "menu-title" > < / h1 >
< div class = "right-buttons" >
< a href = "print.html" title = "Print this book" aria-label = "Print this book" >
< i id = "print-button" class = "fa fa-print" > < / i >
< / a >
< a href = "https://github.com/helix-editor/helix" title = "Git repository" aria-label = "Git repository" >
< i id = "git-repository-button" class = "fa fa-github" > < / i >
< / a >
< / div >
< / div >
< div id = "search-wrapper" class = "hidden" >
< form id = "searchbar-outer" class = "searchbar-outer" >
< input type = "search" name = "search" id = "searchbar" name = "searchbar" placeholder = "Search this book ..." aria-controls = "searchresults-outer" aria-describedby = "searchresults-header" >
< / form >
< div id = "searchresults-outer" class = "searchresults-outer hidden" >
< div id = "searchresults-header" class = "searchresults-header" > < / div >
< ul id = "searchresults" >
< / ul >
< / div >
< / div >
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
< script type = "text/javascript" >
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
< / script >
< div id = "content" class = "content" >
< main >
< h1 id = "installation" > < a class = "header" href = "#installation" > Installation< / a > < / h1 >
< p > We provide pre-built binaries on the < a href = "https://github.com/helix-editor/helix/releases" > GitHub Releases page< / a > .< / p >
< p > < a href = "https://repology.org/project/helix/versions" > < img src = "https://repology.org/badge/vertical-allrepos/helix.svg" alt = "Packaging status" / > < / a > < / p >
< h2 id = "osx" > < a class = "header" href = "#osx" > OSX< / a > < / h2 >
< p > Helix is available in homebrew-core:< / p >
< pre > < code > brew install helix
< / code > < / pre >
< h2 id = "linux" > < a class = "header" href = "#linux" > Linux< / a > < / h2 >
< h3 id = "nixos" > < a class = "header" href = "#nixos" > NixOS< / a > < / h3 >
< p > A < a href = "https://nixos.wiki/wiki/Flakes" > flake< / a > containing the package is available in
the project root. The flake can also be used to spin up a reproducible development
shell for working on Helix with < code > nix develop< / code > .< / p >
< p > Flake outputs are cached for each push to master using
< a href = "https://www.cachix.org/" > Cachix< / a > . The flake is configured to
automatically make use of this cache assuming the user accepts
the new settings on first use.< / p >
< p > If you are using a version of Nix without flakes enabled you can
< a href = "https://docs.cachix.org/installation" > install Cachix cli< / a > ; < code > cachix use helix< / code > will
configure Nix to use cached outputs when possible.< / p >
< h3 id = "arch-linux" > < a class = "header" href = "#arch-linux" > Arch Linux< / a > < / h3 >
< p > Releases are available in the < code > community< / code > repository.< / p >
< p > A < a href = "https://aur.archlinux.org/packages/helix-git/" > helix-git< / a > package is also available on the AUR, which builds the master branch.< / p >
< h3 id = "fedora-linux" > < a class = "header" href = "#fedora-linux" > Fedora Linux< / a > < / h3 >
< p > You can install the COPR package for Helix via< / p >
< pre > < code > sudo dnf copr enable varlad/helix
sudo dnf install helix
< / code > < / pre >
< h3 id = "void-linux" > < a class = "header" href = "#void-linux" > Void Linux< / a > < / h3 >
< pre > < code > sudo xbps-install helix
< / code > < / pre >
< h2 id = "windows" > < a class = "header" href = "#windows" > Windows< / a > < / h2 >
< p > Helix can be installed using < a href = "https://scoop.sh/" > Scoop< / a > , < a href = "https://chocolatey.org/" > Chocolatey< / a >
or < a href = "https://msys2.org/" > MSYS2< / a > .< / p >
< p > < strong > Scoop:< / strong > < / p >
< pre > < code > scoop install helix
< / code > < / pre >
< p > < strong > Chocolatey:< / strong > < / p >
< pre > < code > choco install helix
< / code > < / pre >
< p > < strong > MSYS2:< / strong > < / p >
< p > Choose the proper command for your system from below:< / p >
< ul >
< li > For 32 bit Windows 7 or above:< / li >
< / ul >
< pre > < code > pacman -S mingw-w64-i686-helix
< / code > < / pre >
< ul >
< li > For 64 bit Windows 7 or above:< / li >
< / ul >
< pre > < code > pacman -S mingw-w64-x86_64-helix
< / code > < / pre >
< ul >
< li > For 64 bit Windows 8.1 or above:< / li >
< / ul >
< pre > < code > pacman -S mingw-w64-ucrt-x86_64-helix
< / code > < / pre >
< h2 id = "build-from-source" > < a class = "header" href = "#build-from-source" > Build from source< / a > < / h2 >
< pre > < code > git clone https://github.com/helix-editor/helix
cd helix
cargo install --path helix-term
< / code > < / pre >
< p > This will install the < code > hx< / code > binary to < code > $HOME/.cargo/bin< / code > and build tree-sitter grammars in < code > ./runtime/grammars< / code > .< / p >
< p > Helix also needs its runtime files so make sure to copy/symlink the < code > runtime/< / code > directory into the
config directory (for example < code > ~/.config/helix/runtime< / code > on Linux/macOS). This location can be overridden
via the < code > HELIX_RUNTIME< / code > environment variable.< / p >
< div class = "table-wrapper" > < table > < thead > < tr > < th > OS< / th > < th > Command< / th > < / tr > < / thead > < tbody >
< tr > < td > Windows (Cmd)< / td > < td > < code > xcopy /e /i runtime %AppData%\helix\runtime< / code > < / td > < / tr >
< tr > < td > Windows (PowerShell)< / td > < td > < code > xcopy /e /i runtime $Env:AppData\helix\runtime< / code > < / td > < / tr >
< tr > < td > Linux / macOS< / td > < td > < code > ln -s $PWD/runtime ~/.config/helix/runtime< / code > < / td > < / tr >
< / tbody > < / table >
< / div >
< p > 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.< / p >
< p > < strong > PowerShell:< / strong > < / p >
< pre > < code class = "language-powershell" > New-Item -ItemType SymbolicLink -Target " runtime" -Path " $Env:AppData\helix\runtime"
< / code > < / pre >
< p > < strong > Cmd:< / strong > < / p >
< pre > < code class = "language-cmd" > cd %appdata%\helix
mklink /D runtime " < helix-repo> \runtime"
< / code > < / pre >
< p > The runtime location can be overridden via the < code > HELIX_RUNTIME< / code > environment variable.< / p >
< blockquote >
< p > NOTE: if < code > HELIX_RUNTIME< / code > is set prior to calling < code > cargo install --path helix-term< / code > ,
tree-sitter grammars will be built in < code > $HELIX_RUNTIME/grammars< / code > .< / p >
< / blockquote >
< p > If you plan on keeping the repo locally, an alternative to copying/symlinking
runtime files is to set < code > HELIX_RUNTIME=/path/to/helix/runtime< / code >
(< code > HELIX_RUNTIME=$PWD/runtime< / code > if you're in the helix repo directory).< / p >
< p > To use Helix in desktop environments that supports < a href = "https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html" > XDG desktop menu< / a > , including Gnome and KDE, copy the provided < code > .desktop< / code > file to the correct folder:< / p >
< pre > < code class = "language-bash" > cp contrib/Helix.desktop ~/.local/share/applications
< / code > < / pre >
< p > To use another terminal than the default, you will need to modify the < code > .desktop< / code > file. For example, to use < code > kitty< / code > :< / p >
< pre > < code class = "language-bash" > 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
< / code > < / pre >
< p > Please note: there is no icon for Helix yet, so the system default will be used.< / p >
< h2 id = "finishing-up-the-installation" > < a class = "header" href = "#finishing-up-the-installation" > Finishing up the installation< / a > < / h2 >
< p > To make sure everything is set up as expected you should finally run the helix healthcheck via< / p >
< pre > < code > hx --health
< / code > < / pre >
< p > For more information on the information displayed in the health check results refer to < a href = "https://github.com/helix-editor/helix/wiki/Healthcheck" > Healthcheck< / a > .< / p >
< h3 id = "building-tree-sitter-grammars" > < a class = "header" href = "#building-tree-sitter-grammars" > Building tree-sitter grammars< / a > < / h3 >
< p > Tree-sitter grammars must be fetched and compiled if not pre-packaged.
Fetch grammars with < code > hx --grammar fetch< / code > (requires < code > git< / code > ) and compile them
with < code > hx --grammar build< / code > (requires a C++ compiler).< / p >
< h3 id = "installing-language-servers" > < a class = "header" href = "#installing-language-servers" > Installing language servers< / a > < / h3 >
< p > Language servers can optionally be installed if you want their features (auto-complete, diagnostics etc.).
Follow the < a href = "https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers" > instructions on the wiki page< / a > to add your language servers of choice.< / p >
< / main >
< nav class = "nav-wrapper" aria-label = "Page navigation" >
<!-- Mobile navigation buttons -->
< a rel = "prev" href = "title-page.html" class = "mobile-nav-chapters previous" title = "Previous chapter" aria-label = "Previous chapter" aria-keyshortcuts = "Left" >
< i class = "fa fa-angle-left" > < / i >
< / a >
< a rel = "next" href = "usage.html" class = "mobile-nav-chapters next" title = "Next chapter" aria-label = "Next chapter" aria-keyshortcuts = "Right" >
< i class = "fa fa-angle-right" > < / i >
< / a >
< div style = "clear: both" > < / div >
< / nav >
< / div >
< / div >
< nav class = "nav-wide-wrapper" aria-label = "Page navigation" >
< a rel = "prev" href = "title-page.html" class = "nav-chapters previous" title = "Previous chapter" aria-label = "Previous chapter" aria-keyshortcuts = "Left" >
< i class = "fa fa-angle-left" > < / i >
< / a >
< a rel = "next" href = "usage.html" class = "nav-chapters next" title = "Next chapter" aria-label = "Next chapter" aria-keyshortcuts = "Right" >
< i class = "fa fa-angle-right" > < / i >
< / a >
< / nav >
< / div >
< script type = "text/javascript" >
window.playground_copyable = true;
< / script >
< script src = "elasticlunr.min.js" type = "text/javascript" charset = "utf-8" > < / script >
< script src = "mark.min.js" type = "text/javascript" charset = "utf-8" > < / script >
< script src = "searcher.js" type = "text/javascript" charset = "utf-8" > < / script >
< script src = "clipboard.min.js" type = "text/javascript" charset = "utf-8" > < / script >
< script src = "highlight.js" type = "text/javascript" charset = "utf-8" > < / script >
< script src = "book.js" type = "text/javascript" charset = "utf-8" > < / script >
<!-- Custom JS scripts -->
< / body >
< / html >