Integrate Copilot with Blink.cmp
- Switch from copilot.vim to zbirenbaum/copilot.lua - Add blink-cmp-copilot for completion integration - Configure Blink to show Copilot in completion menu - Fix plugin import issues Testing in progress - can be reverted if needed
This commit is contained in:
parent
cdedb7f54c
commit
277be1e79b
2 changed files with 51 additions and 7 deletions
|
|
@ -1,14 +1,35 @@
|
|||
return {
|
||||
-- Use copilot.lua for API access (no UI)
|
||||
{
|
||||
'github/copilot.vim',
|
||||
event = 'VimEnter',
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
-- Accept suggestion with Ctrl-y
|
||||
vim.keymap.set('i', '<C-y>', 'copilot#Accept("\\<CR>")', {
|
||||
expr = true,
|
||||
replace_keycodes = false
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false }, -- Disable inline ghost text
|
||||
panel = { enabled = false }, -- Disable suggestion panel
|
||||
filetypes = {
|
||||
yaml = false,
|
||||
markdown = false,
|
||||
help = false,
|
||||
gitcommit = false,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
["."] = false,
|
||||
},
|
||||
copilot_node_command = 'node', -- Node.js version must be > 18.x
|
||||
server_opts_overrides = {},
|
||||
})
|
||||
vim.g.copilot_no_tab_map = true
|
||||
end,
|
||||
},
|
||||
|
||||
-- Bridge between copilot.lua and blink.cmp
|
||||
{
|
||||
"giuxtaposition/blink-cmp-copilot",
|
||||
dependencies = {
|
||||
"zbirenbaum/copilot.lua",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue