copilot.lua
copilot.lua copied to clipboard
Remove possible closing bracket (or whatever closing pair)
Hi,
i'm facing following minor annoyance and i was wondering, if that's something this plugin COULD fix, or i need to find another solution:
so i'm using nvim-autopairs.... and with copilot snippets this can be a bit annoying. f.e.
someFunc(|)
and the copilot suggestion might already contain a closing bracket, so you end up with
someFunc(copilotsuggestion))
and you now need to remove the extra closing bracket. That's midly annoying.
Any idea how to avoid this?
Regards
I've wanted to solve this for a while since I also use pairs completion, but autopairs really doesn't like to play nice. There might be a way to selectively disable it for a source, but I haven't seen one if so. I'll try looking into it again.
Thanks @zbirenbaum . Is there a way to fix this manually?
Set clear_after_cursor in the copilot-cmp options to true. It will be the default soon, but I left it as opt-in to start so I’d have a chance make sure nothing broke. Sorry for not getting back about this, I resolved it in copilot-cmp but forgot to post and close here.
Hi @zbirenbaum, could you send me the link to remove_after_cursor option? I can not find this setting within copilot-cmp repo.
Found it. Should be clear_after_cursor. Thanks.
Found it. Should be
clear_after_cursor. Thanks.
Oops, sorry I was on mobile and messed that up. I fixed it in my comment case anyone finds this issue and gets confused
Is there no fix if not using copilot-cmp?