Skip to content

Commit dbcee96

Browse files
authored
fix: stop old client if folder changed and new LSP was spawned (#388)
1 parent 256393d commit dbcee96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lua/copilot/client.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ local M = {
2323
local function store_client_id(id)
2424
if M.id and M.id ~= id then
2525
if vim.lsp.get_client_by_id(M.id) then
26-
logger.error("unexpectedly started multiple copilot servers")
27-
return
26+
vim.lsp.stop_client(M.id)
2827
end
2928
end
3029

0 commit comments

Comments
 (0)