From 1ec6f5cbf6ffc44c84783d70039df5295ca22b4e Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 7 Apr 2023 14:01:46 +0800 Subject: fix: remove vim.schedule for on_attach (#2546) --- lua/lspconfig/configs.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/lspconfig/configs.lua') diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua index 1a432694..209a6157 100644 --- a/lua/lspconfig/configs.lua +++ b/lua/lspconfig/configs.lua @@ -204,7 +204,7 @@ function configs.__newindex(t, config_name, config_def) -- 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) + new_config.on_attach = function(client, bufnr) if bufnr == api.nvim_get_current_buf() then M._setup_buffer(client.id, bufnr) else @@ -220,7 +220,7 @@ function configs.__newindex(t, config_name, config_def) }) end end - end) + end new_config.root_dir = root_dir new_config.workspace_folders = { -- cgit v1.2.3-70-g09d2