Repository navigation
Expand file tree
/
Copy pathblink.lua
More file actions
54 lines (54 loc) · 1.44 KB
/
Copy pathblink.lua
File metadata and controls
54 lines (54 loc) · 1.44 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
52
53
54
-- Blink.cmp configuration
-- Autocompletion plugin with multiple sources
return {
"saghen/blink.cmp",
dependencies = {
"Kaiser-Yang/blink-cmp-git",
"Kaiser-Yang/blink-cmp-dictionary",
"joelazar/blink-calc",
},
opts = {
keymap = {
["<CR>"] = { "accept", "fallback" },
["<Esc>"] = { "hide", "fallback" },
["<C-j>"] = { "select_and_accept" },
},
completion = {
list = { selection = { preselect = false, auto_insert = false } },
},
sources = {
default = { "git", "calc" },
per_filetype = {
markdown = { inherit_defaults = true, "dictionary" },
gitcommit = { inherit_defaults = true, "dictionary" },
text = { inherit_defaults = true, "dictionary" },
},
providers = {
calc = {
name = "Calc",
module = "blink-calc",
opts = {
currency_rates = "er-api",
},
},
git = {
module = "blink-cmp-git",
name = "Git",
enabled = function()
return vim.tbl_contains({ "gitcommit", "markdown", "octo" }, vim.bo.filetype)
end,
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") },
},
},
},
},
},
}