Skip to content

Commit 1441fbd

Browse files
committed
Add blink.cmp-copilot
1 parent 63849cc commit 1441fbd

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

config/nvim/lua/plugins/blink-cmp.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ return {
22
"saghen/blink.cmp",
33
build = "cargo +nightly build --release",
44
opts = function(_, opts)
5-
opts.sources = opts.sources or {}
6-
opts.sources.compat = opts.sources.compat or {}
7-
table.insert(opts.sources.compat, "copilot")
5+
-- opts.sources = opts.sources or {}
6+
-- opts.sources.compat = opts.sources.compat or {}
7+
-- table.insert(opts.sources.compat, "copilot")
88

99
-- Configure completion behavior
1010
opts.completion = opts.completion or {}

config/nvim/lua/plugins/copilot.lua

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ return {
77
config = function()
88
require("copilot").setup({
99
panel = {
10-
enabled = true,
10+
enabled = false,
1111
auto_refresh = false,
1212
keymap = {
1313
jump_prev = "[[",
@@ -22,7 +22,7 @@ return {
2222
},
2323
},
2424
suggestion = {
25-
enabled = true,
25+
enabled = false,
2626
auto_trigger = true,
2727
debounce = 75,
2828
keymap = {
@@ -49,4 +49,25 @@ return {
4949
})
5050
end,
5151
},
52+
{
53+
"saghen/blink.cmp",
54+
dependencies = {
55+
{
56+
"giuxtaposition/blink-cmp-copilot",
57+
},
58+
},
59+
opts = {
60+
sources = {
61+
default = { "lsp", "path", "snippets", "buffer", "copilot" },
62+
providers = {
63+
copilot = {
64+
name = "copilot",
65+
module = "blink-cmp-copilot",
66+
score_offset = 100,
67+
async = true,
68+
},
69+
},
70+
},
71+
},
72+
},
5273
}

0 commit comments

Comments
 (0)