atom-ide-rust icon indicating copy to clipboard operation
atom-ide-rust copied to clipboard

Leave annotations during re-build

Open sunjay opened this issue 5 years ago • 1 comments

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

sunjay avatar May 11 '20 14:05 sunjay

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?

alexheretic avatar May 11 '20 15:05 alexheretic