error caught in async handler '/Users/lukasz.kurpiewski/.local/share/nvim/lazy/CopilotChat.nvim/rplugin/python3/copilot-plugin.py:command:CopilotChat [['w
hat does it do']]'
Traceback (most recent call last):
File "/Users/lukasz.kurpiewski/.local/share/nvim/lazy/CopilotChat.nvim/rplugin/python3/copilot-plugin.py", line 55, in copilotChat
view_option = self.nvim.eval("g:copilot_chat_view_option")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pynvim/api/nvim.py", line 319, in eval
return self.request('nvim_eval', string, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pynvim/api/nvim.py", line 199, in request
res = self._session.request(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pynvim/msgpack_rpc/session.py", line 139, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim:E121: Undefined variable: g:copilot_chat_view_option
{
"jellydn/CopilotChat.nvim",
event = "VeryLazy",
opts = {
mode = "split",
prompts = {
Explain = "Explain how it works.",
Review = "Review the following code and provide concise suggestions.",
Tests = "Briefly explain how the selected code works, then generate unit tests.",
Refactor = "Refactor the code to improve clarity and readability.",
},
},
build = function()
vim.defer_fn(function()
vim.cmd("UpdateRemotePlugins")
vim.notify("CopilotChat - Updated remote plugins. Please restart Neovim.")
end, 3000)
end,
config = function()
local present, wk = pcall(require, "which-key")
if not present then
return
end
wk.register({
c = {
c = {
name = "Copilot Chat",
}
}
}, {
mode = "n",
prefix = "<leader>",
silent = true,
noremap = true,
nowait = false,
})
end,
keys = {
{ "<leader>ccc", ":CopilotChat ", desc = "CopilotChat - Prompt" },
{ "<leader>cce", ":CopilotChatExplain ", desc = "CopilotChat - Explain code" },
{ "<leader>cct", "<cmd>CopilotChatTests<cr>", desc = "CopilotChat - Generate tests" },
{ "<leader>ccr", "<cmd>CopilotChatReview<cr>", desc = "CopilotChat - Review code" },
{ "<leader>ccR", "<cmd>CopilotChatRefactor<cr>", desc = "CopilotChat - Refactor code" },
}
},
remote/host: python3 host registered plugins ['copilot-plugin.py']
remote/host: generated rplugin manifest: /Users/lukasz.kurpiewski/.local/share/nvim/rplugin.vim
I have no idea what's the issue.