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.
11 months ago
..
commands Support drawing popup frame (#4313) 11 months ago
keymap feat: smart_tab 1 year ago
ui Support drawing popup frame (#4313) 11 months ago
application.rs make diagnostics stick to word boundaries 11 months ago
args.rs Resolve args.files before changing directory (#8676) 1 year ago
commands.rs Make the indent heuristic configurable 11 months ago
compositor.rs add redraw command (#6949) 1 year ago
config.rs feat: smart_tab 1 year ago
health.rs Add support for showing all LSPs in --health (#7315) 1 year ago
job.rs bump msrv to 1.63 (#5570) 2 years ago
keymap.rs Fix broken indentation that causes the indentation tests to fail. 1 year ago
lib.rs Fix new clippy lints (#5892) 2 years ago
main.rs Resolve args.files before changing directory (#8676) 1 year ago