-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathblink.lua
More file actions
49 lines (46 loc) · 1.42 KB
/
blink.lua
File metadata and controls
49 lines (46 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
return {
"saghen/blink.cmp",
dependencies = {
"rafamadriz/friendly-snippets",
},
version = "*",
build = "cargo build --release",
opts = {
keymap = {
preset = "none",
["<S-Esc>"] = { "hide", "fallback_to_mappings" },
["<CR>"] = { "accept", "fallback" },
["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" },
["<Up>"] = { "select_prev", "fallback" },
["<Down>"] = { "select_next", "fallback" },
},
appearance = {
use_nvim_cmp_as_default = true,
nerd_font_variant = "mono"
},
completion = {
list = {
selection = {
preselect = false,
auto_insert = false
}
},
menu = {
auto_show = function(ctx)
return ctx.mode ~= "cmdline" or not vim.tbl_contains({ "/", "?" }, vim.fn.getcmdtype())
end,
}
},
sources = {
default = { "lsp", "path", "snippets", "buffer" },
min_keyword_length = function(ctx)
if ctx.mode == "cmdline" and string.find(ctx.line, " ") == nil then
return 3
end
return 0
end
},
},
opts_extend = { "sources.default" }
}