-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnvim-cmp.lua
More file actions
52 lines (50 loc) · 1.23 KB
/
Copy pathnvim-cmp.lua
File metadata and controls
52 lines (50 loc) · 1.23 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
-- Blink completion (replaces nvim-cmp)
return {
"saghen/blink.cmp",
version = "v1.*",
event = "InsertEnter",
dependencies = {
"L3MON4D3/LuaSnip",
"rafamadriz/friendly-snippets",
"giuxtaposition/blink-cmp-copilot",
},
opts = function()
local icons = require("config.icons").kind
require("luasnip.loaders.from_vscode").lazy_load()
return {
snippets = { preset = "luasnip" },
appearance = {
nerd_font_variant = "mono",
kind_icons = icons,
},
keymap = {
preset = "default",
["<C-j>"] = { "select_next" },
["<C-k>"] = { "select_prev" },
["<C-b>"] = { "scroll_documentation_up" },
["<C-f>"] = { "scroll_documentation_down" },
["<C-Space>"] = { "show" },
["<C-e>"] = { "cancel" },
["<CR>"] = { "accept", "fallback" },
},
completion = {
documentation = { auto_show = false },
list = { selection = { preselect = true, auto_insert = false } },
},
sources = {
default = { "lsp", "path", "snippets", "buffer", "copilot" },
providers = {
copilot = {
name = "copilot",
module = "blink-cmp-copilot",
score_offset = 100,
async = true,
},
},
},
}
end,
keys = {
{ "<leader>ic", "<cmd>BlinkInfo<CR>", desc = "Completion info" },
},
}