aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp/skeleton.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim_lsp/skeleton.lua')
-rw-r--r--lua/nvim_lsp/skeleton.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/nvim_lsp/skeleton.lua b/lua/nvim_lsp/skeleton.lua
index a097d7cc..7407e39a 100644
--- a/lua/nvim_lsp/skeleton.lua
+++ b/lua/nvim_lsp/skeleton.lua
@@ -111,6 +111,21 @@ function skeleton.__newindex(t, template_name, template)
pcall(config.on_new_config, new_config)
end
+ new_config.on_init = util.add_hook_after(new_config.on_init, function(client, _result)
+ function client.workspace_did_change_configuration(settings)
+ if not settings then return end
+ if vim.tbl_isempty(settings) then
+ settings = {[vim.type_idx]=vim.types.dictionary}
+ end
+ return client.notify('workspace/didChangeConfiguration', {
+ settings = settings;
+ })
+ end
+ if new_config.settings then
+ client.workspace_did_change_configuration(new_config.settings)
+ end
+ end)
+
-- Save the old _on_attach so that we can reference it via the BufEnter.
new_config._on_attach = new_config.on_attach
new_config.on_attach = vim.schedule_wrap(function(client, bufnr)