-
Notifications
You must be signed in to change notification settings - Fork 256
Allow enablement of plugins in InitializeParams.initializationOptions #1026
Comments
You can avoid the double initial build by awaiting the first didChangeConfiguration, see #711. |
The goal isn't to avoid the double initial build, but instead of allowing sending a default configuration as initialize argument very early and to avoid sending a didChangeConfiguration when there was actually no real change in configuration (as it's what we consider being the default). |
I'm convinced it might be worth it to support passing initial config (same as we pass via I stumbled upon a similar problem when trying to integrate RLS in Nuclide (atom-based) - the architecture didn't allow to easily pass initial config; the server was spawned in a generic remote LSP service factory, so getting back to that concrete RLS instance connection is hacky and unergonomic. I think that spawning it with actual initial config seems like a more principled approach, especially since we have designated |
This would be useful to other clients and I think it's a good first issue to tackle. The server logic executed as part of the initialization is here: Line 309 in c76d29b
The idea is to support optional Config value (defined in Line 120 in c76d29b
in the init_options and try to initialize the config with the passed values instead, possibly taking into account also inferring useful defaults (logic defined in Line 245 in c76d29b
|
Thank you! |
Several other LS, include VSCode JSon for instance, so allow usage of InitializeParams.initializationOptions to configure the initial behavior of the server.
I see RLS enables multiple options with DidChangeConfiguration. It would be nice of the same options could be passed as InitializeParams.initializationOptions as well for default enablement.
The text was updated successfully, but these errors were encountered: