31 lines
1.2 KiB
Lua
31 lines
1.2 KiB
Lua
-- blink.cmp replaces nvim-cmp + LuaSnip + 4 cmp-* source plugins. Snippets use Neovim's built-in
|
|
-- engine (vim.snippet), and signature help is built in.
|
|
return {
|
|
'saghen/blink.cmp',
|
|
version = '1.*', -- prebuilt fuzzy matcher binary; falls back to Lua when it can't be downloaded
|
|
dependencies = { 'folke/lazydev.nvim' },
|
|
opts = {
|
|
keymap = {
|
|
preset = 'default', -- <C-n>/<C-p> select, <C-y> accept, <C-Space> open, <C-b>/<C-f> scroll docs, <C-e> hide
|
|
['<C-l>'] = { 'snippet_forward', 'fallback' },
|
|
['<C-h>'] = { 'snippet_backward', 'fallback' },
|
|
},
|
|
appearance = { nerd_font_variant = 'mono' },
|
|
completion = {
|
|
documentation = { auto_show = true, auto_show_delay_ms = 300 },
|
|
},
|
|
signature = { enabled = true },
|
|
sources = {
|
|
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
|
per_filetype = {
|
|
lua = { inherit_defaults = true, 'lazydev' },
|
|
},
|
|
providers = {
|
|
lazydev = { name = 'LazyDev', module = 'lazydev.integrations.blink', score_offset = 100 },
|
|
},
|
|
},
|
|
fuzzy = { implementation = 'prefer_rust' }, -- silently use Lua if the binary is unavailable (offline / odd libc)
|
|
},
|
|
opts_extend = { 'sources.default' },
|
|
}
|