Skip to content

docs(recipes): Add recipe for enabling supertab behavior in blink.cmp #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gregdan3
Copy link

@gregdan3 gregdan3 commented Jun 1, 2025

This recipe sets up blink.cmp's bindings such that will navigate down a list of completions, and will navigate up that list. Enter will submit the selected completion and drop the user into the completion's parameter(s) or directly after the inserted text, whichever applies to that completion.

For reference, I had to dig for close to an hour to figure out how to do this.

The following reddit thread is a collection of similar frustrations, as well as multiple outdated ways to achieve this:
https://www.reddit.com/r/neovim/comments/1hfotru/nvimcmp_super_tab_in_blink/

An incomplete solution is here:
LazyVim/LazyVim#250 (reply in thread)

But the preset must be set to "enter", as noted here: Saghen/blink.cmp#576 (reply in thread)

I plainly cannot find where this is documented within blink.cmp's docs.


Edit: Saw the other PR #148 after making this.
However, the linked Blink docs and apparently Blink's super-tab preset don't provide a complete implementation of Supertab as far as I'm aware- you can use tab to navigate, but enter is not the insert binding.
For comparison, the nvim-cmp recipe in the docs gives you both tab navigation and completion insert with enter, so the recipe provided in this PR will have matching behavior, but the other PR will not.

This recipe sets up blink.cmp's bindings such that <Tab> will navigate
down a list of completions, and <S-Tab> will navigate up that list.
Enter will submit the selected completion and drop the user into the
completion's parameter(s) or directly after the inserted text, whichever
applies to that completion.

For reference, I had to dig for close to an hour to figure out how to do
this.

The following reddit thread is a collection of similar frustrations, as
well as multiple outdated ways to achieve this:
https://www.reddit.com/r/neovim/comments/1hfotru/nvimcmp_super_tab_in_blink/

An incomplete solution is here:
LazyVim/LazyVim#250 (reply in thread)

But the preset must be set to "enter", as noted here:
Saghen/blink.cmp#576 (reply in thread)

I plainly cannot find where this is documented within blink.cmp's docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant