-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathblink.lua
More file actions
51 lines (51 loc) · 1.35 KB
/
blink.lua
File metadata and controls
51 lines (51 loc) · 1.35 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
50
51
-- Blink.cmp configuration
-- Autocompletion plugin with multiple sources
return {
"saghen/blink.cmp",
dependencies = {
{
"Kaiser-Yang/blink-cmp-git",
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"Kaiser-Yang/blink-cmp-dictionary",
dependencies = { "nvim-lua/plenary.nvim" },
},
"joelazar/blink-calc",
},
opts = {
keymap = {
-- ["<Tab>"] = { LazyVim.cmp.map({ "snippet_forward" }), "select_next", "fallback" },
-- ["<S-Tab>"] = { LazyVim.cmp.map({ "snippet_backward" }), "select_prev", "fallback" },
["<CR>"] = { "accept", "fallback" },
["<Esc>"] = { "hide", "fallback" },
["<C-j>"] = { "select_and_accept" },
},
completion = {
list = { selection = { preselect = false, auto_insert = false } },
},
sources = {
default = { "git", "dictionary", "calc" },
providers = {
calc = {
name = "Calc",
module = "blink-calc",
},
git = {
module = "blink-cmp-git",
name = "Git",
opts = {},
},
dictionary = {
module = "blink-cmp-dictionary",
name = "Dict",
min_keyword_length = 3,
max_items = 10,
opts = {
dictionary_files = { vim.fn.expand("~/.config/dict/words.txt") },
},
},
},
},
},
}