Skip to content

Commit 79c86f9

Browse files
committed
alt_path
1 parent 64234a7 commit 79c86f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/copilot/util.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ M.get_completion_params = function()
2828
end
2929

3030
M.get_copilot_path = function(plugin_path)
31-
local root_path = plugin_path or vim.fn.stdpath("data") .. "/site/pack/packer/"
31+
local root_path = plugin_path or vim.fn.stdpath("data")
32+
local packer_path = root_path .. "/site/pack/packer/"
3233
for _, loc in ipairs{"opt", "start"} do
33-
local copilot_path = root_path .. loc .. "/copilot.lua/copilot/index.js"
34+
local copilot_path = packer_path .. loc .. "/copilot.lua/copilot/index.js"
3435
if vim.fn.filereadable(copilot_path) ~= 0 then
3536
return copilot_path
3637
end

0 commit comments

Comments
 (0)