Disabling of tab in copilot.vim doesn't work #8105
-
According to the documentation you can set
to disable the completion by tab and map it to another key. Once I set Let me know if you need any other information on this issue :) |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 21 replies
-
@SaskiaKeil |
Beta Was this translation helpful? Give feedback.
-
Well, a bit embarrassing but it turns out that I remapped tab to tab as C-I represents the tab key -.- |
Beta Was this translation helpful? Give feedback.
-
Seems like this is still an issue, I'm getting it with the following config:
with |
Beta Was this translation helpful? Give feedback.
-
Just passing through to say, wanting to work with |
Beta Was this translation helpful? Give feedback.
-
Use this:
I also find it useful to disable copilot for certain filetypes:
Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
For anyone looking to set GitHub Copilot in AstroNvim, here is how you do it:
options = {
opt = {
-- some existing code in here ...
},
g = {
-- some existing code in here ...
copilot_no_tab_map = true,
copilot_assume_mapped = true,
},
},
mappings = {
-- first key is the mode
n = {
-- some existing code in here ...
},
t = {
-- some existing code in here ...
},
i = {
["<F1>"] = { 'copilot#Accept("<CR>")', silent = true, expr = true },
["<F2>"] = { 'copilot#Next()', silent = true, expr = true },
["<F3>"] = { 'copilot#Previous()', silent = true, expr = true },
}
},
|
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
None of the keymaps here worked for me for some reason. I had to use copilot with tab to write me a keymap and that worked fine: |
Beta Was this translation helpful? Give feedback.
-
None of the suggestions have worked for me. Do you have any idea what else I could try? |
Beta Was this translation helpful? Give feedback.
-
I set the "set paste" in vim, the tab can't accept the suggestion, |
Beta Was this translation helpful? Give feedback.
-
I tried this |
Beta Was this translation helpful? Give feedback.
-
Looking at their code at (on my box):
Given that they already are mapping 3 keys that are near each other, adding a 4th to accept suggestions and then disabling tab worked for me. I did this:
With this, you can just type "Alt " (without the space) whenever you want copilot to suggest a completion, then "Alt [" or "Alt ]" to scroll through options, then "Alt ;" to accept it. |
Beta Was this translation helpful? Give feedback.
-
I'm gonna share the one and only thing that worked for me on my MacOS.
Something I have for sure verified: if I remove I, for whatever reason, have to have both:
Again, this is the ONLY thing that has worked for me short of using a different plugin such as Tabnine, which I did for a while (Made me realize I really appreciate a neovim plugin that DOES NOT preset keymaps to use it). It wasn't the end of the world but I was sort of unlearning using tab the way I have been using it forever and working around it. I literally just had this moment where I was like, I wonder if I can unset a keybinding after it's been set, discovered del in help, and tried adding that in on top of the no_tab_completion Tab still does what it's supposed to now too, which is insert n spaces in my case. |
Beta Was this translation helpful? Give feedback.
-
The behavior described here, where suggestions are disabled if Copilot.vim doesn't think you have a map, was removed a few months ago. |
Beta Was this translation helpful? Give feedback.
The behavior described here, where suggestions are disabled if Copilot.vim doesn't think you have a map, was removed a few months ago.