3318953bf6
This is partially a style commit: * Pull more bindings out the `change_by_selection` closure like the line-ending string and the comment tokens used for continuation. * Prefer `Editor::config` to `Document`'s config. The rest is changes to places where `insert_newline` may allocate. The first is to move `new_text` out of the `change_by_selection` closure, reusing it between iterations. This is not necessarily always an improvement as we need to clone the text for the return type of the closure. `SmartString`'s `From<String>` implementation reuses the allocation when the string is too long to inline and drops it if it is short enough to inline though which can be wasteful. `From<&String>` clones the string's allocation only when it is too long to be inlined, so we save on allocations for any `new_text` short enough to be inlined. The rest is changes to `new_text.reserve_exact`. Previously calls to this function in this block mixed up character and byte indexing by treating the length of the line-ending as 1. `reserve_exact` takes a number of bytes to reserve and that may be 2 when `line_ending` is a CRLF. A call to `reserve_exact` is also added to the branch used when continuing line comments. |
||
---|---|---|
.cargo | ||
.github | ||
book | ||
contrib | ||
docs | ||
helix-core | ||
helix-dap | ||
helix-event | ||
helix-loader | ||
helix-lsp | ||
helix-lsp-types | ||
helix-parsec | ||
helix-stdx | ||
helix-term | ||
helix-tui | ||
helix-vcs | ||
helix-view | ||
runtime | ||
xtask | ||
.envrc | ||
.gitattributes | ||
.gitignore | ||
base16_theme.toml | ||
Cargo.lock | ||
Cargo.toml | ||
CHANGELOG.md | ||
default.nix | ||
flake.lock | ||
flake.nix | ||
grammars.nix | ||
languages.toml | ||
LICENSE | ||
logo_dark.svg | ||
logo_light.svg | ||
logo.svg | ||
README.md | ||
rust-toolchain.toml | ||
rustfmt.toml | ||
screenshot.png | ||
shell.nix | ||
theme.toml |
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
Although it's primarily a terminal-based editor, I am interested in exploring a custom renderer (similar to Emacs) using wgpu or skulpin.
Note: Only certain languages have indentation definitions at the moment. Check
runtime/queries/<lang>/
for indents.scm
.
Installation
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).
Credits
Thanks to @jakenvac for designing the logo!