Skip to content

Commit 458209e

Browse files
committed
fix for path
1 parent b625b32 commit 458209e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lua/copilot/copilot_handler.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ local send_editor_info = function (a, b, c, d)
1212
name = "Neovim",
1313
},
1414
}, 600)
15-
-- print(vim.inspect(responses))
1615
end
1716

1817
local capabilities = vim.lsp.protocol.make_client_capabilities()
@@ -37,7 +36,9 @@ vim.lsp.start_client({
3736
vim.lsp.buf_attach_client(0, client.id)
3837
vim.api.nvim_create_autocmd({'BufEnter'}, {
3938
callback = function ()
40-
if not vim.lsp.buf_get_clients(0)[client.id] then vim.lsp.buf_attach_client(0, client.id) end
39+
if not vim.lsp.buf_get_clients(0)[client.id] then
40+
vim.lsp.buf_attach_client(0, client.id)
41+
end
4142
end,
4243
once = false,
4344
})

lua/copilot/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ M.get_copilot_path = function()
3131
local root_path = vim.fn.stdpath("data") .. "/site/pack/packer/"
3232
for _, loc in ipairs{"opt", "start"} do
3333
local copilot_path = root_path .. loc .. "/copilot.lua/copilot/index.js"
34-
if vim.fn.filereadable(copilot_path) then
34+
if vim.fn.filereadable(copilot_path) ~= 0 then
3535
return copilot_path
3636
end
3737
end

0 commit comments

Comments
 (0)