Closed adonespitogo closed 11 months ago
What does :Copilot status
say when you're editing markdown file?
Here's the :Copilot status
output:
[Copilot] Online
[Copilot] Disabled ('filetype' markdown rejected by config filetypes[markdown])
Here's my packer config for copilot.lua
and copilot-cmp
:
use({
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
panel = {
enable = false,
},
suggestion = {
enable = false,
debounce = 250,
},
filetypes = {
markdown = true,
},
})
end,
})
use({
"zbirenbaum/copilot-cmp",
after = { "copilot.lua" },
config = function()
require("copilot_cmp").setup()
end,
})
Your config looks alright.
Did you compile packer config (or whatever it is that needed to be done... I don't use packer) after changing the config?
Also make sure you're using the latest version of the plugin.
Yes every plugin in my system is updated using :PackerSync. There’s no need to compile packer. Closing and reopening nvim is enough to reload all config changes.
What's the output for :Copilot version
?
Are you using the exact config from https://github.com/zbirenbaum/copilot.lua/issues/200#issuecomment-1666965998? Or is there any difference in your actual config?
filetypes = {
markdown = true,
},
is working alright for me.
:Copilot version output
Neovim 0.9.1
copilot.vim 1.9.1
copilot.lua e48bd7020a98be217d85c006a298656294fd6210
copilot/dist/agent.js not running
Node.js 16.4.0
If you would like to see my complete nvim config, here's the link to my repo:
https://github.com/adonespitogo/nvim/blob/master/lua/packer_init.lua
Hi, I just did another :PackerSync
just now and everything worked. I don't why it did not work previously for markddown files. It was working with my golang files, but not with markdown. But now it worked for markdown after updating my nvim plugins. We can now close this issue as resolved.
I tried adding the option
filetypes
and setmarkdown
totrue
, but copilot is still not working for markdown files. I'm usingcopilot-cmp
along withcopilot.lua
.When I type
:LspInfo
copilot is not listed in the lsp clients.