888f4fef6f
* Split helix_core::find_root and helix_loader::find_local_config_dirs The documentation of find_root described the following priority for detecting a project root: - Top-most folder containing a root marker in current git repository - Git repository root if no marker detected - Top-most folder containing a root marker if not git repository detected - Current working directory as fallback The commit contained in https://github.com/helix-editor/helix/pull/1249 extracted and changed the implementation of find_root in find_root_impl, actually reversing its result order (since that is the order that made sense for the local configuration merge, from innermost to outermost ancestors). Since the two uses of find_root_impl have different requirements (and it's not a matter of reversing the order of results since, e.g., the top repository dir should be used by find_root only if there's not marker in other dirs), this PR splits the two implementations in two different specialized functions. In doing so, find_root_impl is removed and the implementation is moved back in find_root, moving it closer to the documented behaviour thus making it easier to verify it's actually correct * helix-core: remove Option from find_root return type It always returns some result, so Option is not needed |
||
---|---|---|
.cargo | ||
.github | ||
book | ||
contrib | ||
docs | ||
helix-core | ||
helix-dap | ||
helix-loader | ||
helix-lsp | ||
helix-term | ||
helix-tui | ||
helix-view | ||
runtime | ||
xtask | ||
.envrc | ||
.gitattributes | ||
.gitignore | ||
.ignore | ||
base16_theme.toml | ||
Cargo.lock | ||
Cargo.toml | ||
CHANGELOG.md | ||
default.nix | ||
flake.lock | ||
flake.nix | ||
grammars.nix | ||
languages.toml | ||
LICENSE | ||
README.md | ||
rust-toolchain.toml | ||
rustfmt.toml | ||
screenshot.png | ||
shell.nix | ||
theme.toml | ||
VERSION |
Helix
A Kakoune / Neovim inspired editor, written in Rust.
The editing model is very heavily based on Kakoune; during development I found myself agreeing with most of Kakoune's design decisions.
For more information, see the website or documentation.
All shortcuts/keymaps can be found in the documentation on the website.
Features
- Vim-like modal editing
- Multiple selections
- Built-in language server support
- Smart, incremental syntax highlighting and code editing via tree-sitter
It's a terminal-based editor first, but I'd like to explore a custom renderer (similar to Emacs) in wgpu or skulpin.
Note: Only certain languages have indentation definitions at the moment. Check
runtime/queries/<lang>/
for indents.scm
.
Installation
Packages are available for various distributions (see Installation docs).
If you would like to build from source:
git clone https://github.com/helix-editor/helix
cd helix
cargo install --path helix-term
This will install the hx
binary to $HOME/.cargo/bin
and build tree-sitter grammars.
If you want to customize your languages.toml
config,
tree-sitter grammars may be manually fetched and built with hx --grammar fetch
and hx --grammar build
.
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, or %AppData%/helix/runtime
on Windows).
OS | Command |
---|---|
Windows (cmd.exe) | xcopy /e /i runtime %AppData%\helix\runtime |
Windows (PowerShell) | xcopy /e /i runtime $Env:AppData\helix\runtime |
Linux/macOS | ln -s $PWD/runtime ~/.config/helix/runtime |
This location can be overridden via the HELIX_RUNTIME
environment variable.
Packages already solve this for you by wrapping the hx
binary with a wrapper
that sets the variable to the install dir.
NOTE: running via cargo also doesn't require setting explicit
HELIX_RUNTIME
path, it will automatically detect theruntime
directory in the project root.
In order to use LSP features like auto-complete, you will need to install the appropriate Language Server for a language.
MacOS
Helix can be installed on MacOS through homebrew:
brew install helix
Contributing
Contributing guidelines can be found here.
Getting help
Your question might already be answered on the FAQ.
Discuss the project on the community Matrix Space (make sure to join #helix-editor:matrix.org
if you're on a client that doesn't support Matrix Spaces yet).