From c6d747e6a5227e17556c62e16ed054398eb1a89a Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Fri, 3 Jun 2022 18:16:11 +0200 Subject: 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. --- runtime/lua/vim/lsp.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 6bf772ed65..361bcec04b 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -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 -- cgit