We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30321e3 commit bdda0eaCopy full SHA for bdda0ea
1 file changed
lua/copilot/client.lua
@@ -25,12 +25,12 @@ local function store_client_id(id)
25
M.id = id
26
end
27
28
+local function reuse_client(client, conf)
29
+ return client.config.root_dir == conf.root_dir and client.name == conf.name
30
+end
31
+
32
local lsp_start = vim.lsp.start
33
if not lsp_start then
- local function reuse_client(client, conf)
- return client.config.root_dir == conf.root_dir and client.name == conf.name
- end
-
34
-- shim for neovim < 0.8.2
35
lsp_start = function(lsp_config)
36
local bufnr = vim.api.nvim_get_current_buf()
@@ -97,7 +97,7 @@ function M.buf_attach(force)
97
return
98
99
100
- local client_id = lsp_start(M.config)
+ local client_id = lsp_start(M.config, { reuse_client = reuse_client, bufnr = M.id })
101
store_client_id(client_id)
102
103
0 commit comments