My mods of a post-modern modal text editor.
Go to file
Pascal Kuthe 515ef17207 make diagnostics stick to word boundaries
Diagnostics are currently extended if text is inserted at their end. This is
desirable when inserting text after an identifier. For example consider:

let foo = 2;
    --- unused variable

Renaming the identifier should extend the diagnostic:

let foobar = 2;
    ------ unused variable

This is currently implemented in helix but as a consequence adding whitespaces
or a type hint also extends the diagnostic:

let foo      = 2;
    -------- unused variable
let foo: Bar = 2;
    -------- unused variable

In these cases the diagnostic should remain unchanged:

let foo      = 2;
    --- unused variable
let foo: Bar = 2;
    --- unused variable

As a heuristic helix will now only extend diagnostics that end on a word char
if new chars are appended to the word (so not for punctuation/ whitespace).
The idea for this mapping was inspired for the word level tracking vscode uses
for many positions. While VSCode doesn't currently update diagnostics after
receiving publishDiagnostic it does use this system for inlay hints for example.
Similarly, the new association mechanism implemented here can be used for word
level tracking of inlay hints.

A similar mapping function is implemented for word starts. Together
these can be used to make a diagnostic stick to a word. If that word
is removed that diagnostic is automatically removed too. This is the exact
same behavior VSCode inlay hints eixibit.
2023-12-27 15:28:14 +09:00
.cargo enable rendering in integration tests (#5819) 2023-02-04 13:20:23 -08:00
.github Update upload/download-artifact actions to v4 (#9120) 2023-12-21 14:09:26 +09:00
book Add config to mark diagnostic sources as persistent 2023-12-27 15:28:14 +09:00
contrib Add changelog notes for 23.10 (#8086) 2023-10-26 01:10:45 +09:00
docs use workspace inheritance for common version (#8925) 2023-12-05 10:54:18 +09:00
helix-core make diagnostics stick to word boundaries 2023-12-27 15:28:14 +09:00
helix-dap use workspace inheritance for common version (#8925) 2023-12-05 10:54:18 +09:00
helix-event use workspace inheritance for common version (#8925) 2023-12-05 10:54:18 +09:00
helix-loader build(deps): bump once_cell from 1.18.0 to 1.19.0 (#9053) 2023-12-12 22:46:11 +09:00
helix-lsp build(deps): bump lsp-types from 0.94.1 to 0.95.0 (#9117) 2023-12-20 00:30:46 +09:00
helix-parsec use workspace inheritance for common version (#8925) 2023-12-05 10:54:18 +09:00
helix-term make diagnostics stick to word boundaries 2023-12-27 15:28:14 +09:00
helix-tui build(deps): bump once_cell from 1.18.0 to 1.19.0 (#9053) 2023-12-12 22:46:11 +09:00
helix-vcs build(deps): bump gix from 0.55.2 to 0.56.0 (#9055) 2023-12-13 02:29:43 +01:00
helix-view make diagnostics stick to word boundaries 2023-12-27 15:28:14 +09:00
runtime Add markup styling to nord theme (#9135) 2023-12-22 13:52:26 +09:00
xtask use workspace inheritance for common version (#8925) 2023-12-05 10:54:18 +09:00
.envrc direnv: Watch the rust-toolchain file (#8921) 2023-11-29 11:01:12 +09:00
.gitattributes Add .gitattributes (#3318) 2022-08-03 08:21:51 -05:00
.gitignore Remove vale from .gitignore 2022-07-26 10:22:28 +09:00
.ignore docs: Update mdBook theme and improve maintainability (#7524) 2023-07-09 19:20:38 +02:00
base16_theme.toml Set ui.text.inactive for official themes 2022-12-17 13:59:05 -06:00
Cargo.lock build(deps): bump tokio from 1.35.0 to 1.35.1 (#9169) 2023-12-27 13:34:58 +09:00
Cargo.toml use workspace inheritance for common version (#8925) 2023-12-05 10:54:18 +09:00
CHANGELOG.md Add changelog notes for 23.10 (#8086) 2023-10-26 01:10:45 +09:00
default.nix build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
flake.lock nix: update flake inputs (#8943) 2023-12-04 01:46:17 +01:00
flake.nix Fix version of Nix package (#9013) 2023-12-09 03:04:09 +09:00
grammars.nix grammars.nix: allow the user to apply overlays (#8749) 2023-11-09 09:56:57 +01:00
languages.toml Add config to mark diagnostic sources as persistent 2023-12-27 15:28:14 +09:00
LICENSE Add the LICENSE file. 2021-05-11 01:44:00 +09:00
logo.svg Reduce logo.svg size (-93B) (#9106) 2023-12-22 13:52:53 +09:00
logo_dark.svg Add logo with text included (#4973) 2022-12-03 11:05:15 +09:00
logo_light.svg Add logo with text included (#4973) 2022-12-03 11:05:15 +09:00
README.md Update README.md to add link to Kakoune and Neovim (#9119) 2023-12-19 15:50:39 +01:00
rust-toolchain.toml bump MSRV to 1.70.0 (#8877) 2023-11-25 13:55:49 +01:00
rustfmt.toml Add rustfmt.toml to force formatting to use rustfmt defaults 2021-07-23 18:11:22 +09:00
screenshot.png update screenshot (#1879) 2022-03-30 00:16:57 +09:00
shell.nix build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
theme.toml feat(debug): highlight current line (#5957) 2023-03-29 12:52:19 +09:00

Helix

Build status GitHub Release Documentation GitHub contributors Matrix Space

Screenshot

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.

Troubleshooting

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

Installation documentation.

Packaging status

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!