zbirenbaum / copilot-cmp

Lua plugin to turn github copilot into a cmp source
MIT License
1.07k stars 38 forks source link

copilot rejected from attaching. #77

Closed TechDufus closed 1 year ago

TechDufus commented 1 year ago

image

I get this when opening a .yml file that my ansible LSP auto-attaches to. I can proc the message from the screenshot by running :Copilot attach.

If I force the attach with :Copilot! attach like Copilot suggests, all is well, everything works, hallelujah.. My question is how to force auto-attaching like this.... thoughts?

MunifTanjim commented 1 year ago

Use the filetypes option mentioned here: https://github.com/zbirenbaum/copilot.lua#setup-and-configuration

require('copilot').setup({
  filetypes = {
    yaml = true,
  },
})
TechDufus commented 1 year ago

FYI I tried

require('copilot').setup({
  filetypes = {
    ['*'] = true,
  },
})

but this didn't change anything... Ideally copilot would attach to any open file I have... so I'd assume this would work, but it doesn't.

MunifTanjim commented 1 year ago

That should actually work. Not sure why it doesn't for you.

TechDufus commented 1 year ago

I'll play with it.. THANK YOU for getting back to me! :)