Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] Suggestions required regarding changes to preferences of language server in Eclipse CDT

Hi Manish,
and thanks for working on this!

First, I think the issues you mention here is not a blocker for a 1st iteration. So if you can make a patch with "only" the link to preferences, that would be already good and we  could merge it even if no solution was found yet for those questions. More than that, I actually think separating those in distinct patch would be better than working on a too complex single patch.

  1. Now when the user changes the config options in that page and clicks apply then we try launch the language server with those options in the background. It would be great if you all could provide suggestions on how to let the user know whether the language server was started successfully or it failed (by showing a pop-up or something else).
I think this story of a LS that doesn't start properly should have a dedicated bug report. It's indeed something that can already be annoying with current LSP4E, indepedently of preferences changing.
At the moment, I don't really know what could be a good way to handle it.
 
  1. When the language server has started successfully and then if the user changes the config options (i.e. changes specific options for the server or changes the language server) in that preferences page, then how to reflect those changes on-the-fly without requiring to restart Eclipse (As of now for any changes to config of an already running language server to be taken into effect, we need to restart Eclipse).
Finding a generic way to know whether a LS needs to be restarted or not according to the change is probably impossible, and you'd have to rely on code that's specific do your integration to decide that. What you can do is to place a PreferenceListener on the preferences your LS depends on, and when those preferences are modified, react with a restart of the affected LS. You may need some extra API in LanguageServerAccessor to find the started instances of LS by LanguageServerDefinition, if so, patch would be welcome.

HTH


Back to the top