Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] LSP4E diagnostics outside of generic editor



On Sun, Jun 24, 2018 at 8:05 PM, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:
That said: if, in our first iteration of CDT/LSP integration, we would like LSP-related features to only be present in the Generic Editor, and not in our C++ Editor, is there a way to set that up?

Technically, I'm not aware of an easy way to not show the problem markers in a Text Editor in general without tweaking the host editor (in this case the C++ editor) to ignore some markers. But maybe there are possible things I'm missing.
You could try some hacks such as placing resource listeners that would automatically delete markers that come from LSP4E (they have a specific id) and invoke LanguageServerWrapper#disconnect() but that would also affect the results in Generic Editor if both C++ and Generic Editor happen to show the same file at the same time.
Also, I think only error markers are coming from the LS to the C++ editor because they're on the resource layer. The vast majority of features are JFace classes that only are enabled in Generic Editor as default. So you shouldn't see too much LSP feature in the C++ editor, except markers.

In term of organization of your development, especially for a 1st iteration, then I think it's also questionable whether you want to spend effort in disabling features that can turn being profitable on the long run. If I were to see a demo of the LSP-based C++ tools in Eclipse IDE and would see markers from the LS inside the C++ editor, I would personally find it positive and acceptable for a 1st iteration. Additional markers don't have a negative impact usually, and showing them can drive to some more thoughts.
My take on this would be "This is not an issue you need to fix" https://www.youtube.com/watch?v=532j-186xEQ&t=45s ;)

HTH

Back to the top