Fork me on GitHub
#vim
<
2024-03-21
>
Chase15:03:57

Any neovim users trying out Copilot? I'm reluctantly trying it again (for non Clojure code tbh but anyways) but hate when it just starts auto suggesting in my editor. It takes me right out of my flow. I want it to only suggest something when I specifically call for it too. It looks like I will need to call (copilot-suggest) to do this but I don't know how to have it turned off by default and then just call that as desired. Ideally I don't even want Copilot itself started by default. So I would prefer to globally have it off and then use the :Copilot enable command to get it started and running and then use whatever shortcut I've set to actually call (copilot-suggest). :help copilot doesn't seem to provide much on how to configure in such a way. Any help here? I'm still on old school init.vim, not lua btw for the instructions. TIA!

Oliver Marshall17:03:43

I'm personally using copilot-cmp so I won't be able to help with the specifics.

👍 1
Oliver Marshall17:03:29

I will say that personally I've enjoyed being surprised when copilot "read's my mind" and writes the next line of code for me 🙂 But ofc that's personal preference.

Evan17:03:56

I don't use copilot, but maybe you could just enable/disable it via custom keymaps. e.g.

:noremap  :Copilot enable
:noremap  :Copilot disable

Chase01:03:45

I was able to piece together a solution using that github discussion and my own config, thanks so much! Seems an obvious little hack to just disable it for all filetypes by default. I'm not sure if that still means it starts up in the background though since there are no valid filetypes. But as soon as I ask for a suggestion it very quickly gives one so I'm thinking it is. I'll look into it more