Updated blink config
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
enabled = false,
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
"L3MON4D3/LuaSnip",
|
||||
},
|
||||
-- enabled = false,
|
||||
version = "*",
|
||||
config = function()
|
||||
require("blink-cmp").setup({
|
||||
@@ -10,31 +13,52 @@ return {
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
preset = "default",
|
||||
|
||||
["<C-space>"] = {},
|
||||
["<C-e>"] = {},
|
||||
|
||||
["<C-c>"] = { "show", "show_documentation", "hide_documentation" },
|
||||
["<NL>"] = { "select_and_accept" },
|
||||
|
||||
["<Up>"] = { "select_prev", "fallback" },
|
||||
["<Down>"] = { "select_next", "fallback" },
|
||||
},
|
||||
completion = {
|
||||
menu = {
|
||||
border = "rounded",
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
window = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
},
|
||||
snippets = {
|
||||
preset = "luasnip",
|
||||
expand = function(snippet)
|
||||
require("luasnip").lsp_expand(snippet)
|
||||
end,
|
||||
active = function(filter)
|
||||
if filter and filter.direction then
|
||||
return require("luasnip").jumpable(filter.direction)
|
||||
end
|
||||
return require("luasnip").in_snippet()
|
||||
end,
|
||||
jump = function(direction)
|
||||
require("luasnip").jump(direction)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "luasnip", "snippets", "buffer", "path" },
|
||||
default = { "lsp", "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,
|
||||
@@ -43,14 +67,14 @@ return {
|
||||
},
|
||||
buffer = {
|
||||
name = "Buffer",
|
||||
enabled = true,
|
||||
module = "blink.cmp.sources.buffer",
|
||||
min_keyword_length = 2,
|
||||
score_offset = 70,
|
||||
},
|
||||
path = {
|
||||
name = "Path",
|
||||
module = "blink.cmp.sources.path",
|
||||
score_offset = 3,
|
||||
fallbacks = { "snippets", "luasnip", "buffer" },
|
||||
opts = {
|
||||
trailing_slash = false,
|
||||
label_trailing_slash = true,
|
||||
|
||||
Reference in New Issue
Block a user