You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to figure out the very basics for hours and I've got a point where I'm not sure if I'm missing something or if there's a misconfig with my lunarvim setup.
I'm sure this is going to help a lot of newbies like myself looking for answers.
Q.1: How do you accept the suggestions? I see that in your default settings you're suggesting CR, which I think it's enter? - which doesn't do anything other than newline.
Q.2:
:help copilot and a few other options are not working, is this intentional - is there a problem with my packages?
Q.1: How do you accept the suggestions? I see that in your default settings you're suggesting CR, which I think it's enter? - which doesn't do anything other than newline.
That's for Copilot Panel. Panel is opened by pressing <M-CR> (i.e. Alt+Enter or Option+Enter).
For suggestion keymaps, check suggestion.keymap config (it's commented out in your screenshot).
Q.2:
:help copilot and a few other options are not working, is this intentional - is there a problem with my packages?
Thank you @MunifTanjim !
What I cannot figure out is how the autocompletion works, if I type the resource halfway I can do tab and it will autocomplete (I think that's because of lsp) - I've seen youtube videos pulling this trick but no luck for me ^^
Run :Copilot auth and complete the authentication process (if it's not done already).
Run :Copilot status to make sure copilot is running and enabled.
Now open a file and start writing codes/comments. Copilot will autmatically show suggestions.
You can accept the suggestion by pressing the suggestion.keymap.accept key (as set in Step 2). Or request the prev/next suggestion by pressing suggestion.keymap.prev/suggestion.keymap.next key (as set in Step 2).
Note: <M-l> means Alt+l (or Option+l for Mac). If for some reason Alt+l does not work on the terminal you're using, try using different keymap in Step 2.
If you want to use <Tab> for accepting suggestion, check the code snippets in this comment: #91 (comment)
Activity
MunifTanjim commentedon Dec 22, 2022
That's for Copilot Panel. Panel is opened by pressing
<M-CR>(i.e. Alt+Enter or Option+Enter).For suggestion keymaps, check
suggestion.keymapconfig (it's commented out in your screenshot).This plugin doesn't have any helpfile. Check the README.md file on this repo for all the info: https://github.com/zbirenbaum/copilot.lua/blob/master/README.md
Aur0nd commentedon Dec 22, 2022
Thank you @MunifTanjim !
What I cannot figure out is how the autocompletion works, if I type the resource halfway I can do tab and it will autocomplete (I think that's because of lsp) - I've seen youtube videos pulling this trick but no luck for me ^^
https://youtu.be/FL70Locz6oY?t=259
MunifTanjim commentedon Dec 22, 2022
Okay, so here's a more complete guide:
Install
zbirenbaum/copilot.luawith your plugin manager of choice (vim-plugorpacker.nvimorlazy.nvimor something else).Setup
copilot.lua.Restart Neovim.
Run
:Copilot authand complete the authentication process (if it's not done already).Run
:Copilot statusto make sure copilot is running and enabled.Now open a file and start writing codes/comments. Copilot will autmatically show suggestions.
You can accept the suggestion by pressing the
suggestion.keymap.acceptkey (as set in Step 2). Or request the prev/next suggestion by pressingsuggestion.keymap.prev/suggestion.keymap.nextkey (as set in Step 2).Note:
<M-l>meansAlt+l(orOption+lfor Mac). If for some reasonAlt+ldoes not work on the terminal you're using, try using different keymap in Step 2.If you want to use
<Tab>for accepting suggestion, check the code snippets in this comment: #91 (comment)Aur0nd commentedon Dec 23, 2022
Bless you @MunifTanjim that actually did the trick man. - Thank you so much!!!!
Adding the keymap / Alt+ l works like a charm now.