69 lines
2.5 KiB
Lua
69 lines
2.5 KiB
Lua
return {
|
|
"saghen/blink.cmp",
|
|
dependencies = "rafamadriz/friendly-snippets",
|
|
enabled = false,
|
|
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" },
|
|
}
|