docs(recipes): Add recipe for enabling supertab behavior in blink.cmp #149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.