-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typing text offsets diagnostics that are after text typed #701
Comments
I did initially map diagnostics through edits to prevent this (updating the positions), but I noticed that rust-analyzer would unhelpfully re-send the wrong offsets immediately, undoing the work. |
(It'll fix the positions after you save and it re-runs the checks) |
Commented out code: helix/helix-view/src/document.rs Lines 638 to 646 in 7e11236
|
Is there anything that can be done about it? |
Looks like we're not getting |
Turns out this is a known rust-analyzer issue: rust-lang/rust-analyzer#8836 |
correct me if I am wrong but I think this is fixed on master |
I think this still happens unless it was fixed in a recent rust-analyzer version. From what I understand this is caused by rust-analyzer sending out-of-date/cached ranges in publishDiagnostic which undoes the work we do within helix for updating ranges rust-lang/rust-analyzer#10628 (comment) |
https://asciinema.org/a/8zyizvoNTUMkDhhzeaS10qw0W
I presume this is probably because of char indexing for the diagnostics.
The text was updated successfully, but these errors were encountered: