Closed bastianlb closed 1 year ago
How did you configure the plugin?
What's the output of :Copilot version
?
Hi there, thanks for the quick response.
I configured the plugins as follows, as recommended for packer / lvim:
{
"zbirenbaum/copilot.lua",
event = { "VimEnter" },
config = function()
vim.defer_fn(function()
require("copilot").setup {
plugin_manager_path = os.getenv "LUNARVIM_RUNTIME_DIR" .. "/site/pack/packer",
}
end, 100)
end,
},
{
"zbirenbaum/copilot-cmp",
after = { "copilot.lua" },
config = function()
require("copilot_cmp").setup()
end,
},
The output of :Copilot version
is:
Neovim 0.9.0
copilot.vim 1.8.3
copilot.lua e6e6433537bc42d9150bcad931d6fbd4aea3f751
copilot/dist/agent.js 1.73.0
Node.js 16.13.2
Can you try getting rid of the vim.defer_fn
and see if the situation improves?
This unfortunately did not resolve the issue..
I have this issue too. Version info and packer config snippet below (or the full config).
Neovim 0.9.0
copilot.vim 1.8.3
copilot.lua decc8d43bcd73a288fa689690c20faf0485da217
copilot/dist/agent.js 1.73.0
Node.js 19.9.0
use {
"zbirenbaum/copilot.lua",
config = function ()
require("copilot").setup()
end
}
use {
"zbirenbaum/copilot-cmp",
after = { "copilot.lua" },
config = function ()
require("copilot_cmp").setup()
end
}
You might have some plugin that's changing the buffer after you open the copilot panel.
@dancek can you try disabling Pocco81/auto-save.nvim
plugin and see if the issue still remains?
You can also try enabling panel auto_refresh
, so that the panel automatically refreshes if buffer changes:
require("copilot").setup({
-- other options
panel = {
-- other options
auto_refresh = true,
},
})
Let's reopen if this still exists.
I still have the issue, tho i'm not sure how to debug it.
FYI, i'm using coc
with various plugins.
I also have the refresh set to true
for he panel. Still, it just gets stuck at synthesizing ?/0 solutions
It might just be a network issue. Copilot server might have blocked your IP for some reason, or you network might have some firewall. You can also try signout and signin again... that sometimes solves the issue.
I'd like to propose to open this again as after some time away from vim I'm still unable to get panel completions to work. Completions via cmp work fine. However, I also don't get any error messages in logs that requests from copilot are failing, just a silent "Synthesizing ?/0 solutions (Duplicates hidden) [loading]" at which point the panel seems stuck.
Right now I'm using an out-of-the-box lazyvim config with all plugins and vim up to date.. Is anyone able to reproduce this? Would adding some error messages regarding failed copilot API requests be helpful here? I also tried this on several different networks with all VPNs disabled and re-authenticating Copilot.lua, to no avail.
Neovim 0.9.2 (also tried 0.10.0-dev)
copilot.vim 1.10.2
copilot.lua 2c942f33ba5c621c906e625e00a1bb504b65e2f0
copilot/dist/agent.js not running
Node.js 18.17.1
The only messages I get in my lsp.log are:
[START][2023-09-14 09:55:33] LSP logging initiated
[WARN][2023-09-14 09:55:33] ...lsp/handlers.lua:134 "The language server copilot triggers a registerCapability handler for workspace/didChangeWorkspaceFolders despite dynamicRegistration set to false. Report upstream, this warning is harmless"
copilot/dist/agent.js not running
Here the copilot server is not running at all.
Hey, thanks for the quick responses. I'm not sure why it wasn't running in this moment. I can generally reliably get cmp completions, just not panel completions.
I am having trouble generating consistent panel predictions from copilot. The "trace" logs in LSP completion seem to indicate this is an error from the api.
So apparently the document changes somehow in between calls, preventing panel completions. I've noticed that the panel calls get created successfully when I predict with my cursor at the end of the document.
Would anyone know the reason for this? I've tested it on both LTS and Dev nvim. I am using LunarVim.