vim

Chase 2024-03-21T15:54:57.977399Z

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 Marshall 2024-03-21T17:36:15.115189Z

Maybe this would help: https://github.com/orgs/community/discussions/77307

✅ 1
Oliver Marshall 2024-03-21T17:36:43.427379Z

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

👍 1
Oliver Marshall 2024-03-21T17:37:29.310799Z

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.

Evan 2024-03-21T17:40:56.387239Z

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

:noremap  :Copilot enable
:noremap  :Copilot disable

Chase 2024-03-22T01:48:45.560419Z

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

🙌 1
Adam Helins 2024-03-22T09:41:11.681509Z

Do you use Copilot actively, is it useful for you workflow? I tried it a little while ago with good intentions but had to disable it, it was just outputting garbage on average. Surprisingly good for matching the coding style but the actual logic was very poor in Clojure.

Oliver Marshall 2024-03-22T09:44:23.483779Z

I find it useful more often than not I think. Mostly for "obvious" code I was about to write anyway: boilerplate, simple data transformations. It's hard to come up with examples though 😅