Cannot accept suggestion in LazyVim #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Configured like this:
config =key, which is not necessary for other plugins in generalI have it configured like following and it works nice for initial testing.
I also tried #7 locally and the problem with the cursor when accepting multiple lines is gone.
One thing I would like to ask is if it supports cycling through available suggestions. Or does it only make one suggestion at any time based on what it perceives the context is?
I did not use
codeium.nvim. I usedcodeium.vimand after that also started testingneocodeium.nvimfor a brief time.supermavendoes indeed seems more performant and multi-line suggestions work without any glitch from the little testing that I did. For the foreseeable future I'll just keep bothcodeium.vimandsupermaventesting in different configurations, until I find more points of what I like/dislike and also want to see ifsupermavenadds some kind of cycling through suggestions. It's still early to make a final decision.Would be better with cmp support and cycling suggestions but hopefully that keeps the performance at the same level.
I believe this could be closed. It works as intended in LazyVim. I think it must be a keymap problem from the side of OP. LazyVim uses
<Tab>by default for Luasnip moving to next/previous nodes, so either he has to disable that in his personal configuration or just assign a different keymap forsupermaven.It works correctly with the code snippet of my previous comment for my personal usage.
I don't have anything manually configured on
<Tab>so I'm not sure the problem is on "my" side :)Maybe the solution is to add
cmpsupport, or to add a supermaven extra in LazyVim, or just a note for LazyVim users in the README, or something else 🤷Yet I would not close this as of now, because the plugin seemed broken to me until I read your comment.
It's not their duty to look for every configuration file and test that it works with every one of them.
I am using LazyVim too and this is not really an obligation of the plugin to figure out someones whole configurations.
That is indeed an issue on 'your' side.
I do agree with the
cmpsupport as that would make it far more better experience but this is a plugin in beta.And extras for LazyVim are done by their own maintainers so should ask them to resolve this.
Neither
supermavennorLazyVimis responsible for this.I just told you in my previous comment that
<Tab>is by default used for Luasnip in LazyVim. So, either you have to unmap that key in your personal configuration or use another keymap to accept suggestions, like I did in the code snippet that I provided (because I use Luasnip snippets and I like the default<Tab>for jumping between nodes).If you copy/paste the code snippet from my first comment, it will not be broken.
On another note, I personally prefer the style with inline ghost text instead of it being a cmp source. That's the reason why I didn't use
codeium.nvimbut preferredcodeium.viminstead, so I really hope the maintainers of this plugin keep it the way it is right now. The only suggestion I would make, is to provide a way to cycle through different suggestions, but I don't know ifsupermaveneven provides such a feature or maybe it's only provided in the paid plan. It looks really a lot more performant compared tocodeium.nvim,codeium.vimandneocodeium.nvimthat I've tested so far. The only comparison I can't make is copilot itself because I've never used it.@dpetka2001 Can you provide your configuration because for me i am not using LuaSnips
tabkey for accepting but instead have it what comes default with LazyVim using<CR>Enterto accept the suggestions.Currently deleting the keymap using :
I deleted it still but when in insert mode i cannot use
Tabto accept the suggestions from supermaven.This is how supermaven is setup.
Thanks for help.
EDIT: It is far more performant then Copilot i have used copilot for a long time.
<Tab>is used for Luasnip snippets. Probably you're confusing it with nvim-cmp<CR>which is for accepting suggestions from nvim-cmp. You can use<tab>with following configurationPS: This way you won't be able to jump forth and back between Luasnip nodes. If that's something you won't be using in your workflow, that's fine. Otherwise I would suggest to at least remap these keys to something else if you want to keep the Luasnip functionality.
I have never used
Tabfor anything as the snippets appear ascmpsource which now i understand that i am passing thecmp_luasnipto the table.This is a far better option to use tab for completions and the rest with
cmp.Thanks for the info.
I was using the Supertab recipe from LazyVim and have been able to integrate Supermaven into it as seen below. However, I can't figure out how to make
on_accept_suggestionaccept the suggestion instead of word-by-word. Any suggestions would be much appreciated!Since the last PR you can use it as a cmp source straight away (that’s how I use it now):
Or use it similar to @hmnd which would come down to something like this:
@kaiiserni I would actually prefer using it with only using
tabfor completion. It was previously working using the snippet provided above by @dpetka2001 but after the update to 0.10 it has stopped working again.Any help will be appreciated.
And yes i am on LazyVim and i have luasnip extra enabled.
I have upgraded to 0.10 as well and just tried the default Supermaven config to confirm, and everything (including tab) just works. At first glance, what @dpetka2001 suggested should still work in your case, but I’m not familiar with lazyvim and the like. It could be that other keymaps are conflicting, which you can quickly check with
:imap.Thank you for the suggestion @kaiiserni now the key was being inhibited by
nvim-cmpso disabling it from their has made it work.And i am also baffled why do i not know
:imapwhen using aprebuiltconfig.I am also having this issue. I am using Lazyvim and i have tried all of the suggested fixes with no luck. I can see the suggestions but i can not accept them with tab. I managed to disable inline hints and add Supermaven as a source to cmp but I don't like that setup and want to keep them separated.
Can you show me what you did to get it working?
@thadkrugman have you updated to the latest versions of nvim as in
0.10and also of LazyVim ?I am asking because the methods are different for both.
And also if you are using either native-snippets or the Extra for
LuaSnip.I have the latest version of nvim. I don't know which version of LazyVim I have. I thought it kept itself updated when I run lazy update. I have whatever snippets that came with it and I currently have LuaSnip enabled to see if that fixed anything but it didn't work with or without it.
@thadkrugman
If you are using lazy updates then you're already on the latest for LazyVim as well.
I am currently using with
LuaSnipExtra as the Native snippets were very slow for me .nvim-cmpandLuaSnipyou will have to disable<tab>and<s-tab>like this :@Redoxahmii That worked! Thank you very much!
I also was struggling getting
Tabto autocomplete also withLazyVim. I don't haveLuaSnipenabled, so looks likenvim-cmpwas the culprit as it's automatically enabled inside of LazyVim and was gobbling up the tab keystroke.Did the trick for me. Thanks for the fix @Redoxahmii !
My pleasure
Even with no keybindings set (at least, that's what
:imap <Tab>tells me), I am still unable to accept suggestions from Supermaven. It instead indents, though perhaps this isn't necessarily a Supermaven issue. I have to map to other keybindings instead.For reference, I'm on Lazyvim v12, and Neovim 0.10.
@shovel-kun i am still using this same method and on the latest version of LazyVim for Supermaven this is the config i have currently for supermaven:
If this is still not working for you then the issue might be some other plugin for you.
thanks so much for this!!
Here is what I did to support Supermaven and use tab to select:
I was having this issue earlier. And what fixed it for me is uninstalling copilot nvim