nvim/lua/plugins/blink.lua

39 lines
1 KiB
Lua

return {
'saghen/blink.cmp',
dependencies = { 'rafamadriz/friendly-snippets' },
version = '1.*',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = {
preset = 'none',
['<C-space>'] = { 'show', 'fallback' },
['<C-e>'] = { 'cancel', 'fallback' },
['<CR>'] = { 'accept', 'fallback' },
['<Tab>'] = { 'select_next', 'fallback' },
['<S-Tab>'] = { 'select_prev', 'fallback' },
['<C-n>'] = { 'select_next', 'fallback' },
['<C-p>'] = { 'select_prev', 'fallback' },
['<C-d>'] = { 'scroll_documentation_down', 'fallback' },
['<C-u>'] = { 'scroll_documentation_up', 'fallback' },
},
completion = {
trigger = {
show_on_insert_on_trigger_character = false,
},
documentation = {
auto_show = false,
},
menu = {
auto_show = true,
},
},
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' }
},
fuzzy = {
implementation = 'prefer_rust_with_warning',
},
},
}