Skip to content

Commit 4651881

Browse files
committed
feat(blink): update config
1 parent 4aef61b commit 4651881

File tree

1 file changed

+42
-11
lines changed

1 file changed

+42
-11
lines changed

lua/modules/configs/completion/blink.lua

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,54 @@ local opts = {
1818
["<S-k>"] = { "scroll_documentation_up", "fallback" },
1919
["<S-j>"] = { "scroll_documentation_down", "fallback" },
2020
["<S-s>"] = { "show_signature", "hide_signature", "fallback" },
21-
cmdline = {
21+
},
22+
--- @type blink.cmp.CmdlineConfig
23+
cmdline = {
24+
enabled = true,
25+
sources = function()
26+
local type = vim.fn.getcmdtype()
27+
if type == "/" or type == "?" then
28+
return { "buffer" }
29+
end
30+
if type == ":" or type == "@" then
31+
return { "cmdline", "path" }
32+
end
33+
return {}
34+
end,
35+
keymap = {
2236
preset = "enter",
2337
["<Tab>"] = { "select_next", "fallback" },
2438
["<S-Tab>"] = { "select_prev", "fallback" },
2539
["<CR>"] = { "accept", "fallback" },
2640
["<C-c>"] = { "cancel", "hide", "fallback" },
2741
},
42+
completion = {
43+
menu = {
44+
draw = {
45+
columns = {
46+
{ "label", "label_description", gap = 1 },
47+
{ "kind_icon", "kind", gap = 1 },
48+
{ "source_name" },
49+
},
50+
},
51+
},
52+
},
53+
},
54+
--- @type blink.cmp.TermConfig
55+
term = {
56+
enabled = true,
57+
sources = {},
58+
completion = {
59+
menu = {
60+
draw = {
61+
columns = {
62+
{ "label", "label_description", gap = 1 },
63+
{ "kind_icon", "kind", gap = 1 },
64+
{ "source_name" },
65+
},
66+
},
67+
},
68+
},
2869
},
2970

3071
appearance = {
@@ -73,16 +114,6 @@ local opts = {
73114

74115
sources = {
75116
default = { "lazydev", "lsp", "path", "snippets", "buffer", "ripgrep" },
76-
cmdline = function()
77-
local type = vim.fn.getcmdtype()
78-
if type == "/" or type == "?" then
79-
return { "buffer" }
80-
end
81-
if type == ":" or type == "@" then
82-
return { "cmdline", "path" }
83-
end
84-
return {}
85-
end,
86117
providers = {
87118
lazydev = {
88119
module = "lazydev.integrations.blink",

0 commit comments

Comments
 (0)