e604d9f8e0
Whenever a document is changed helix maps various positions like the cursor or diagnostics through the `ChangeSet` applied to the document. Currently, this mapping handles replacements as follows: * Move position to the left for `Assoc::Before` (start of selection) * Move position to the right for `Assoc::After` (end of selection) However, when text is exactly replaced this can produce weird results where the cursor is moved when it shouldn't. For example if `foo` is selected and a separate cursor is placed on each character (`s.<ret>`) and the text is replaced (for example `rx`) then the cursors are moved to the side instead of remaining in place. This change adds a special case to the mapping code of replacements: If the deleted and inserted text have the same (char) length then the position is returned as if the replacement doesn't exist. only keep selections invariant under replacement Keeping selections unchanged if they are inside an exact replacement is intuitive. However, for diagnostics this is not desirable as helix would otherwise fail to remove diagnostics if replacing parts of the document. |
||
---|---|---|
.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
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
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!