Skip to content

Commit 0e8fdda

Browse files
committed
update blink.cmp flake
1 parent d0aab9d commit 0e8fdda

File tree

2 files changed

+46
-30
lines changed

2 files changed

+46
-30
lines changed

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

home/nvim/lua/plugins.lua

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,44 @@ return inject_all({
3838
},
3939
opts = {
4040
keymap = {
41-
show = "<c-space>",
42-
hide = "<c-e>",
43-
accept = "<cr>",
44-
select_and_accept = "<cr>",
45-
select_prev = { "<s-tab>", "<up>", "<c-p>" },
46-
select_next = { "<tab>", "<down>", "<c-n>" },
47-
48-
show_documentation = "<c-space>",
49-
hide_documentation = "<c-space>",
50-
scroll_documentation_up = "<c-u>",
51-
scroll_documentation_down = "<c-d>",
52-
53-
snippet_forward = "<tab>",
54-
snippet_backward = "<s-tab>",
41+
["<c-space>"] = { "show", "show_documentation", "hide_documentation" },
42+
["<c-e>"] = { "hide", "fallback" },
43+
["<cr>"] = { "accept", "fallback" },
44+
["<tab>"] = {
45+
function(cmp)
46+
if cmp.is_in_snippet() then
47+
return cmp.select_and_accept()
48+
else
49+
return cmp.select_next()
50+
end
51+
end,
52+
"snippet_forward",
53+
"fallback",
54+
},
55+
["<s-tab>"] = { "select_prev", "snippet_backward", "fallback" },
56+
["<up>"] = { "select_prev", "fallback" },
57+
["<down>"] = { "select_next", "fallback" },
58+
["<c-p>"] = { "select_prev", "fallback" },
59+
["<c-n>"] = { "select_next", "fallback" },
60+
["<c-u>"] = { "scroll_documentation_up", "fallback" },
61+
["<c-d>"] = { "scroll_documentation_down", "fallback" },
62+
},
63+
trigger = {
64+
completion = {
65+
show_in_snippet = false,
66+
},
67+
},
68+
sources = {
69+
completion = {
70+
enabled_providers = { "lsp", "path", "snippets", "buffer" },
71+
},
5572
},
5673
accept = {
5774
auto_brackets = {
5875
enabled = true,
76+
semantic_token_resolution = {
77+
blocked_filetypes = {},
78+
},
5979
},
6080
},
6181
windows = {
@@ -72,14 +92,10 @@ return inject_all({
7292
highlight = {
7393
use_nvim_cmp_as_default = true,
7494
},
75-
nerd_font_variant = "mono",
76-
sources = {
77-
providers = {
78-
{ "blink.cmp.sources.lsp", name = "LSP" },
79-
{ "blink.cmp.sources.path", name = "Path" },
80-
{ "blink.cmp.sources.snippets", name = "Snippets", score_offset = -3 },
81-
},
95+
ghost_text = {
96+
enabled = true,
8297
},
98+
nerd_font_variant = "mono",
8399
kind_icons = {
84100
Class = "󰠱",
85101
Color = "󰏘",

0 commit comments

Comments
 (0)