Closed NicoGGG closed 6 months ago
Are you following the instructions?
https://github.com/zbirenbaum/copilot.lua?tab=readme-ov-file#setup-and-configuration
Did you call the .setup
function?
I did initially c-cd this and it was working.
I am still new to neovim and lua and read somewhere that the setup()
method is implicitly called so I removed it later on.
But actually the config field must be set to at least true to do that. So setting config = true
is doing the trick. Also, I just discovered that passing options to opts will also implicitly call setup()
So in the end this
return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
opts = {
suggestion = {
auto_trigger = true,
},
},
}
and this
return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = true,
}
both do the trick
I know you probably know that but just in case an another neovim beginner is having trouble with that.
Thank you very much for the quick answer and for putting me back on track !
Hello,
I am having issue with copilot suddenly. When I run :Copilot I always get this error
I saw an old issue talking about going back to node16 but it does exactly the same. Which is weird considering that if I read the code correctly, now you are not supposed to have node < 18 to make it work.
According to the stacktrace, this line is crashing:
local node = config.get("copilot_node_command")
in copilot/client.lua:52My
node --version
output isv18.18.2
. I use nvm for node version management.Does anyone else have the same issue ? If it is just me do you have a clue what could cause that ? The weird thing is that is used to work, and suddenly it does this. I don't remember changing anything on the nodejs part of my setup.
Thanks a lot in advance