Skip to content

Commit 4b59d4c

Browse files
authored
fix(client): missing bufnr for get_active_clients (zbirenbaum#30)
1 parent c8a422d commit 4b59d4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/copilot/client.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ M.buf_attach_copilot = function()
55
if vim.tbl_contains(M.params.ft_disable, vim.bo.filetype) then return end
66
if not vim.bo.buflisted or not vim.bo.buftype == "" then return end
77
local client_id = util.find_copilot_client()
8-
local buf_clients = vim.lsp.get_active_clients(0)
8+
local buf_clients = vim.lsp.get_active_clients({ bufnr = 0 })
99
if not buf_clients and client_id or (client_id and not buf_clients[client_id]) then
1010
vim.lsp.buf_attach_client(0, client_id)
1111
end

0 commit comments

Comments
 (0)