Open cpitclaudel opened 2 years ago
To me, 1. looks good enough. Is there anything against this approach?
It's pretty good but it pollutes the buffer a bit (related locations are shown at all times).
We could refine it by defining a new error level for "related locations" (since LSP related locations don't have a severity) and giving it an empty face, so that it doesn't appear in the buffer. Then LSP-ui could be made to display related locations when the point is on the main error.
It's pretty good but it pollutes the buffer a bit (related locations are shown at all times).
Isn't that what we want? Or you mean that it is visible all the time, not only when you hover the "master" error? Don't we want that feature to be part of flycheck itself?
Or you mean that it is visible all the time, not only when you hover the "master" error?
That's right.
Don't we want that feature to be part of flycheck itself?
We do; I think flycheck-inline does something about that already.
Hi there,
LSPdiagnostics have a relatedInformation field that LSP-mode does not seem to be using yet. How hard would it be to display these related locations?
This was briefly discussed in https://github.com/emacs-lsp/lsp-ui/issues/165, but since LSP discards the information it's not something that LSP-ui can do on it's own, I think.
I'm guessing there are two ways to go about this:
group
feature (this is how it was intended to be used, but LSP-mode uses it to store source information). The code looks something like this:equal
objects, so it actually works to use flycheck errors as keys; each error can be made to point to a list of other flycheck errors, and they can be displayed selectively when the cursor is on an error.Here's a demo of the first option with flycheck-inline: