44d2fc2ab3
This fixes the modification indicator when saving from insert mode with
a config such as
[keys.insert]
C-s = ":write"
Previously the modification indicator would be stuck showing modified
even if the buffer contents matched the disk contents when writing after
some changes in insert mode with this binding. In insert mode we do not
eagerly write undo checkpoints so that all changes made become one
checkpoint as you exit insert mode. When saving, `Document`s `changes`
`ChangeSet` would be non-empty and when there are changes we show the
buffer as modified. Then switching to normal mode would append the
changes to history, bumping the current revision past what it was when
last saved. Since the last saved revision and current revision were then
unsynced, the modification indicator would always show modified.
This matches [Kakoune's behavior]. Kakoune has a different architecture
for writes but a very similar system for history, transactions and undo
checkpoints (what it calls "undo groups"). Upon saving Kakoune creates
an undo checkpoint if there are any uncommitted changes. It does this
after the write has gone through since its writing system is different.
For our writing system it's cleaner to make the undo checkpoint before
performing the save so that the history revision increments before we
send the save event.
[Kakoune's behavior]:
|
4 months ago | |
---|---|---|
.cargo | 10 months ago | |
.github | 6 months ago | |
book | 4 months ago | |
contrib | 4 months ago | |
docs | 5 months ago | |
helix-core | 4 months ago | |
helix-dap | 4 months ago | |
helix-event | 6 months ago | |
helix-loader | 4 months ago | |
helix-lsp | 4 months ago | |
helix-parsec | 12 months ago | |
helix-stdx | 5 months ago | |
helix-term | 4 months ago | |
helix-tui | 5 months ago | |
helix-vcs | 4 months ago | |
helix-view | 4 months ago | |
runtime | 4 months ago | |
xtask | 7 months ago | |
.envrc | 12 months ago | |
.gitattributes | 2 years ago | |
.gitignore | 2 years ago | |
CHANGELOG.md | 8 months ago | |
Cargo.lock | 4 months ago | |
Cargo.toml | 5 months ago | |
LICENSE | 4 years ago | |
README.md | 11 months ago | |
base16_theme.toml | 5 months ago | |
default.nix | 6 months ago | |
flake.lock | 8 months ago | |
flake.nix | 5 months ago | |
grammars.nix | 10 months ago | |
languages.toml | 4 months ago | |
logo.svg | 11 months ago | |
logo_dark.svg | 11 months ago | |
logo_light.svg | 11 months ago | |
rust-toolchain.toml | 6 months ago | |
rustfmt.toml | 3 years ago | |
screenshot.png | 3 years ago | |
shell.nix | 2 years ago | |
theme.toml | 7 months ago |
README.md
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!