Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Leave annotations during re-build #163

Open
sunjay opened this issue May 11, 2020 · 1 comment
Open

Leave annotations during re-build #163

sunjay opened this issue May 11, 2020 · 1 comment

Comments

@sunjay
Copy link
Member

sunjay commented May 11, 2020

I don't know what the actual term is, so by "annotations" I'm referring to lines with errors or warnings.

I've noticed that every time I save all of the annotations disappear while things are being re-built. This is pretty distracting and slows me down as I have to wait a couple seconds for things to re-appear in order to figure out what to fix next. It would be great if the annotations could stay around until the new ones are available to replace them.

ezgif com-optimize

@alexheretic
Copy link
Member

They're called diagnostics in LSP, they come from textDocument/publishDiagnostics messages.

Each message tells us about all the errors in the project, so a message with no errors means there are no errors. rust-analyzer sends a bunch out, presumably streaming the cargo watch -x check output as it comes.

So the first message out will clear all the old ones until the new cargo check run re-spits out the new diagnostic. RLS waited until the end of a build to publish them, so this didn't apply (but it also took longer to see changes).

I'm not sure of a better way of dealing with this, maybe there's some server config that can help?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants