Trying out blink cmp
This commit is contained in:
67
lua/taken/plugins/blink.lua
Normal file
67
lua/taken/plugins/blink.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
version = "*",
|
||||
config = function()
|
||||
require("blink-cmp").setup({
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
|
||||
["<C-space>"] = {},
|
||||
["<C-e>"] = {},
|
||||
["<C-c>"] = { "show", "show_documentation", "hide_documentation" },
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "luasnip", "snippets", "buffer", "path" },
|
||||
providers = {
|
||||
lsp = {
|
||||
name = "lsp",
|
||||
enabled = true,
|
||||
module = "blink.cmp.sources.lsp",
|
||||
-- kind = "LSP",
|
||||
-- fallbacks = { "snippets", "luasnip", "buffer" },
|
||||
score_offset = 90,
|
||||
},
|
||||
luasnip = {
|
||||
name = "luasnip",
|
||||
enabled = true,
|
||||
module = "blink.cmp.sources.luasnip",
|
||||
min_keyword_length = 2,
|
||||
-- fallbacks = { "snippets" },
|
||||
score_offset = 85,
|
||||
},
|
||||
snippets = {
|
||||
name = "snippets",
|
||||
enabled = true,
|
||||
module = "blink.cmp.sources.snippets",
|
||||
score_offset = 80,
|
||||
},
|
||||
buffer = {
|
||||
name = "Buffer",
|
||||
module = "blink.cmp.sources.buffer",
|
||||
min_keyword_length = 2,
|
||||
},
|
||||
path = {
|
||||
name = "Path",
|
||||
module = "blink.cmp.sources.path",
|
||||
score_offset = 3,
|
||||
fallbacks = { "snippets", "luasnip", "buffer" },
|
||||
opts = {
|
||||
trailing_slash = false,
|
||||
label_trailing_slash = true,
|
||||
get_cwd = function(context)
|
||||
return vim.fn.expand(("#%d:p:h"):format(context.bufnr))
|
||||
end,
|
||||
show_hidden_files_by_default = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
opts_extend = { "sources.default" },
|
||||
}
|
||||
Reference in New Issue
Block a user