on 376c19e help sign in
helix/README.md
146 lines 5.8 kB history raw
1<div align="center">
3<h1>
4<picture>
5 <source media="(prefers-color-scheme: dark)" srcset="logo_dark.svg">
6 <source media="(prefers-color-scheme: light)" srcset="logo_light.svg">
7 <img alt="Helix" height="128" src="logo_light.svg">
8</picture>
9</h1>
11[![Build status](https://github.com/helix-editor/helix/actions/workflows/build.yml/badge.svg)](https://github.com/helix-editor/helix/actions)
12[![GitHub Release](https://img.shields.io/github/v/release/helix-editor/helix)](https://github.com/helix-editor/helix/releases/latest)
13[![Documentation](https://shields.io/badge/-documentation-452859)](https://docs.helix-editor.com/)
14[![GitHub contributors](https://img.shields.io/github/contributors/helix-editor/helix)](https://github.com/helix-editor/helix/graphs/contributors)
15[![Matrix Space](https://img.shields.io/matrix/helix-community:matrix.org)](https://matrix.to/#/#helix-community:matrix.org)
17</div>
19![Screenshot](./screenshot.png)
21A Kakoune / Neovim inspired editor, written in Rust.
23The editing model is very heavily based on Kakoune; during development I found
24myself agreeing with most of Kakoune's design decisions.
26For more information, see the [website](https://helix-editor.com) or
27[documentation](https://docs.helix-editor.com/).
29All shortcuts/keymaps can be found [in the documentation on the website](https://docs.helix-editor.com/keymap.html).
31[Troubleshooting](https://github.com/helix-editor/helix/wiki/Troubleshooting)
33# Features
35- Vim-like modal editing
36- Multiple selections
37- Built-in language server support
38- Smart, incremental syntax highlighting and code editing via tree-sitter
40It's a terminal-based editor first, but I'd like to explore a custom renderer
41(similar to Emacs) in wgpu or skulpin.
43Note: Only certain languages have indentation definitions at the moment. Check
44`runtime/queries/<lang>/` for `indents.scm`.
46# Installation
48Packages are available for various distributions (see [Installation docs](https://docs.helix-editor.com/install.html)).
50If you would like to build from source:
52```shell
53git clone https://github.com/helix-editor/helix
54cd helix
55cargo install --locked --path helix-term
56```
58This will install the `hx` binary to `$HOME/.cargo/bin` and build tree-sitter grammars in `./runtime/grammars`.
60Helix needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
61config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
63| OS | Command |
64| -------------------- | ------------------------------------------------ |
65| Windows (Cmd) | `xcopy /e /i runtime %AppData%\helix\runtime` |
66| Windows (PowerShell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
67| Linux / macOS | `ln -s $PWD/runtime ~/.config/helix/runtime` |
69Starting with Windows Vista you can also create symbolic links on Windows. Note that this requires
70elevated privileges - i.e. PowerShell or Cmd must be run as administrator.
72**PowerShell:**
74```powershell
75New-Item -ItemType Junction -Target "runtime" -Path "$Env:AppData\helix\runtime"
76```
77Note: "runtime" must be absolute path to the runtime directory.
79**Cmd:**
81```cmd
82cd %appdata%\helix
83mklink /D runtime "<helix-repo>\runtime"
84```
86The runtime location can be overridden via the `HELIX_RUNTIME` environment variable.
88> NOTE: if `HELIX_RUNTIME` is set prior to calling `cargo install --locked --path helix-term`,
89> tree-sitter grammars will be built in `$HELIX_RUNTIME/grammars`.
91If you plan on keeping the repo locally, an alternative to copying/symlinking
92runtime files is to set `HELIX_RUNTIME=/path/to/helix/runtime`
93(`HELIX_RUNTIME=$PWD/runtime` if you're in the helix repo directory).
95Packages already solve this for you by wrapping the `hx` binary with a wrapper
96that sets the variable to the install dir.
98> NOTE: running via cargo also doesn't require setting explicit `HELIX_RUNTIME` path, it will automatically
99> detect the `runtime` directory in the project root.
101If you want to customize your `languages.toml` config,
102tree-sitter grammars may be manually fetched and built with `hx --grammar fetch` and `hx --grammar build`.
104In order to use LSP features like auto-complete, you will need to
105[install the appropriate Language Server](https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers)
106for a language.
108[![Packaging status](https://repology.org/badge/vertical-allrepos/helix.svg)](https://repology.org/project/helix/versions)
110## Adding Helix to your desktop environment
112If installing from source, to 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:
114```bash
115cp contrib/Helix.desktop ~/.local/share/applications
116cp contrib/helix.png ~/.local/share/icons
117```
119To use another terminal than the default, you will need to modify the `.desktop` file. For example, to use `kitty`:
121```bash
122sed -i "s|Exec=hx %F|Exec=kitty hx %F|g" ~/.local/share/applications/Helix.desktop
123sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop
124```
126## macOS
128Helix can be installed on macOS through homebrew:
130```
131brew install helix
132```
134# Contributing
136Contributing guidelines can be found [here](./docs/CONTRIBUTING.md).
138# Getting help
140Your question might already be answered on the [FAQ](https://github.com/helix-editor/helix/wiki/FAQ).
142Discuss the project on the community [Matrix Space](https://matrix.to/#/#helix-community:matrix.org) (make sure to join `#helix-editor:matrix.org` if you're on a client that doesn't support Matrix Spaces yet).
144# Credits
146Thanks to [@JakeHL](https://github.com/JakeHL) for designing the logo!