Skip to content

Commit 0e848ad

Browse files
authored
Update the Supertab recipe in recipes.md with a blink.cmp snippet
1 parent 5cc9614 commit 0e848ad

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/configuration/recipes.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,49 @@ override nvim-cmp and add cmp-emoji
2525

2626
Use `<tab>` for completion and snippets (supertab).
2727

28+
```lua
29+
return {
30+
"saghen/blink.cmp",
31+
-- optional: provides snippets for the snippet source
32+
dependencies = "rafamadriz/friendly-snippets",
33+
34+
-- use a release tag to download pre-built binaries
35+
version = "*",
36+
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
37+
-- build = 'cargo build --release',
38+
-- If you use nix, you can build from source using latest nightly rust with:
39+
-- build = 'nix run .#build-plugin',
40+
41+
---@module 'blink.cmp'
42+
---@type blink.cmp.Config
43+
opts = {
44+
-- 'default' for mappings similar to built-in completion
45+
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
46+
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
47+
-- See the full "keymap" documentation for information on defining your own keymap.
48+
keymap = { preset = "super-tab" },
49+
50+
appearance = {
51+
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
52+
-- Useful for when your theme doesn't support blink.cmp
53+
-- Will be removed in a future release
54+
use_nvim_cmp_as_default = true,
55+
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
56+
-- Adjusts spacing to ensure icons are aligned
57+
nerd_font_variant = "mono",
58+
},
59+
60+
-- Default list of enabled providers defined so that you can extend it
61+
-- elsewhere in your config, without redefining it, due to `opts_extend`
62+
sources = {
63+
default = { "lsp", "path", "snippets", "buffer" },
64+
},
65+
},
66+
opts_extend = { "sources.default" },
67+
}
68+
```
69+
70+
Or, if you prefer `nvim-cmp`,
2871
```lua
2972
{
3073
"hrsh7th/nvim-cmp",

0 commit comments

Comments
 (0)