diff options
Diffstat (limited to 'nvim/lua/config/plugins/blink-cmp.lua')
| -rw-r--r-- | nvim/lua/config/plugins/blink-cmp.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/nvim/lua/config/plugins/blink-cmp.lua b/nvim/lua/config/plugins/blink-cmp.lua new file mode 100644 index 0000000..c9c0447 --- /dev/null +++ b/nvim/lua/config/plugins/blink-cmp.lua @@ -0,0 +1,42 @@ +return { + 'saghen/blink.cmp', + dependencies = { 'rafamadriz/friendly-snippets' }, + + version = '1.*', + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + keymap = { + preset = 'default', + -- <up>-<down> to navigate, <right> to accept + ['<C-j>'] = { 'select_next', 'fallback' }, + ['<C-k>'] = { 'select_prev', 'fallback' }, + ['<Tab>'] = { 'select_and_accept', 'fallback' }, + ['<C-l>'] = { 'select_and_accept', 'fallback' }, + }, + + appearance = { + nerd_font_variant = 'mono' + }, + + completion = { documentation = { auto_show = true } }, + + sources = { + default = { 'lsp', 'path', 'snippets', 'buffer' }, + providers = { + snippets = { + opts = { + friendly_snippets = true, + extended_filetypes = { + typescript = { 'javascript' }, + } + } + } + } + }, + + fuzzy = { implementation = "prefer_rust_with_warning" }, + }, + opts_extend = { "sources.default" } +} |
