From c7206327096bedf2e213788a60624a84b3b7552d Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 7 Dec 2022 20:37:16 +0800 Subject: fix: improve client stop logic in LspStop (#2296) --- plugin/lspconfig.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugin/lspconfig.lua') diff --git a/plugin/lspconfig.lua b/plugin/lspconfig.lua index d8c77493..3ecde2f1 100644 --- a/plugin/lspconfig.lua +++ b/plugin/lspconfig.lua @@ -131,8 +131,7 @@ api.nvim_create_user_command('LspStop', function(info) if not server_name then local servers_on_buffer = lsp.get_active_clients { buffer = current_buf } for _, client in ipairs(servers_on_buffer) do - local filetypes = client.config.filetypes - if filetypes and vim.tbl_contains(filetypes, vim.bo[current_buf].filetype) then + if client.attached_buffers[current_buf] then client.stop(force) end end -- cgit v1.2.3-70-g09d2