What happens to diagnostics sent by the LS #683
Replies: 1 comment 7 replies
-
No, there is no cache.
It is a legal use of the protocol but Eglot, and mostly Flymake doesn't know what to do with that extra information right now. That could change, and I think it's a feature for Flymake. I have some ideas, but I've yet to find the manpower (which is mostly me) to implement it in a good architectural way. There is an issue about this: #504 and a pull request #640. I'm going to close the issue in favour of this discussion. Before even touching the code, one needs to understand, under various clearly laid out scenarios, what should happen in terms of -- a) in-buffer annotation (i.e. the in-buffer underlines) in an hypothetical project with files
It's only when the combination of these scenarios is very clearly laid out and understood that we should begin coding. Most of this work should be done in Flymake. Flymake lives in the Emacs repo. Flymake has automatic tests. It would probably be a good beginning to begin speccing this in the automatic tests of Flymake, but it can maybe also be done in the automatic tests of Eglot. |
Beta Was this translation helpful? Give feedback.
-
I'm working with eglot on a Scala project using Metals.
This project, due to Scapegoat compiler plugin, produces tons of diagnostics.
It seems that Metals passes through all diagnostics of the complete project to the LSP client.
How are they handled by the eglot? Are they stored on disk, like a cache?
Assumingly they are passed over to flymake.
It is problematic when there are many diagnostics?
Is this actually the right use of the protocol, when diagnostics of the complete project are sent to the client even though only a tiny fraction are used in the open files?
Beta Was this translation helpful? Give feedback.
All reactions