diff options
| -rw-r--r-- | plugin/lspconfig.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/lspconfig.lua b/plugin/lspconfig.lua index 09d80c69..5afd0895 100644 --- a/plugin/lspconfig.lua +++ b/plugin/lspconfig.lua @@ -90,7 +90,9 @@ api.nvim_create_user_command('LspRestart', function(info) local detach_clients = {} for _, client in ipairs(get_clients_from_cmd_args(info.args)) do client.stop() - detach_clients[client.name] = client + if #client.attached_buffers > 0 then + detach_clients[client.name] = client + end end local timer = vim.loop.new_timer() timer:start( |
