feat(lsp): send didChangeConfiguration after init (#18847)

Most LSP servers require the notification to correctly load the
settings and for those who don't it doesn't cause any harm.

So far this is done in lspconfig, but with the addition of vim.lsp.start
it should be part of core.
This commit is contained in:
Mathias Fußenegger
2022-06-03 18:16:11 +02:00
committed by GitHub
parent 9aba204335
commit c6d747e6a5
3 changed files with 38 additions and 4 deletions

View File

@@ -1117,6 +1117,10 @@ function lsp.start_client(config)
end
end
if next(config.settings) then
client.notify('workspace/didChangeConfiguration', { settings = config.settings })
end
if config.on_init then
local status, err = pcall(config.on_init, client, result)
if not status then