Closed admmasters closed 8 months ago
Hi @admmasters, could share your configuration here? Please run ":UpdateRemotePlugins" command and restart Neovim. A new command, CopilotChatInPlace has released recently. Thanks.
Ok so found the issue, looks like the config from the previous version I had installed needed updating. For anyone else who sees an issue like this:
This older config needed updating from:
return {
"jellydn/CopilotChat.nvim",
opts = {
mode = "split", -- newbuffer or split , default: newbuffer
},
build = function()
vim.defer_fn(function()
vim.cmd("UpdateRemotePlugins")
vim.notify("CopilotChat - Updated remote plugins. Please restart Neovim.")
end, 3000)
end,
event = "VeryLazy",
keys = {
{ "<leader>cce", "<cmd>CopilotChatExplain<cr>", desc = "CopilotChat - Explain code" },
{ "<leader>cct", "<cmd>CopilotChatTests<cr>", desc = "CopilotChat - Generate tests" },
},
}
New config which works for me:
return {
{
"gptlang/CopilotChat.nvim",
dependencies = { "zbirenbaum/copilot.lua" }, -- Or { "github/copilot.vim" }
opts = {
mode = "split", -- newbuffer or split, default: newbuffer
show_help = "yes", -- Show help text for CopilotChatInPlace, default: yes
debug = false, -- Enable or disable debug mode, the log file will be in ~/.local/state/nvim/CopilotChat.nvim.log
},
build = function()
vim.notify("Please update the remote plugins by running ':UpdateRemotePlugins', then restart Neovim.")
end,
event = "VeryLazy",
keys = {
{ "<leader>cce", "<cmd>CopilotChatExplain<cr>", desc = "CopilotChat - Explain code" },
{ "<leader>cct", "<cmd>CopilotChatTests<cr>", desc = "CopilotChat - Generate tests" },
-- Those are available only on canary branch
{
"<leader>ccv",
":CopilotChatVsplitVisual",
mode = "x",
desc = "CopilotChat - Open in vertical split",
},
{
"<leader>ccx",
":CopilotChatInPlace<cr>",
mode = "x",
desc = "CopilotChat - Run in-place code",
},
},
},
}
Closing as config error.
From the stack trace this looks like it’s the same issue as in #56
It is now fixed in main and the config from the ReadMe should work as is.
Describe the bug
Getting the following error each time I try and interact with CopilotChat - this is new and it worked as expected up until the last couple of updates.
Using Lazyvim
Reproduction
Run
CopilotChat <text>
System Info
Used Package Manager
pnpm
Validations