You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-term/src
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.
6 months ago
..
commands Support drawing popup frame (#4313) 7 months ago
keymap feat: smart_tab 11 months ago
ui Support drawing popup frame (#4313) 7 months ago
application.rs make diagnostics stick to word boundaries 6 months ago
args.rs Resolve args.files before changing directory (#8676) 7 months ago
commands.rs Make the indent heuristic configurable 7 months ago
compositor.rs add redraw command (#6949) 10 months ago
config.rs feat: smart_tab 11 months ago
health.rs Add support for showing all LSPs in --health (#7315) 9 months ago
job.rs bump msrv to 1.63 (#5570) 1 year ago
keymap.rs Fix broken indentation that causes the indentation tests to fail. 11 months ago
lib.rs Fix new clippy lints (#5892) 1 year ago
main.rs Resolve args.files before changing directory (#8676) 7 months ago