add copilot to the mix using blink
This commit is contained in:
parent
3c20990a3c
commit
2a9a8ad515
14
init.lua
14
init.lua
|
|
@ -293,6 +293,9 @@ require('lazy').setup({
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'giuxtaposition/blink-cmp-copilot',
|
||||
},
|
||||
|
||||
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
||||
--
|
||||
|
|
@ -771,6 +774,9 @@ require('lazy').setup({
|
|||
return 'make install_jsregexp'
|
||||
end)(),
|
||||
dependencies = {
|
||||
-- Add the copilot source for blink here as well to ensure it loads
|
||||
'giuxtaposition/blink-cmp-copilot',
|
||||
'zbirenbaum/copilot.lua', -- Ensure the base copilot plugin is also present
|
||||
-- `friendly-snippets` contains a variety of premade snippets.
|
||||
-- See the README about individual language/framework/plugin snippets:
|
||||
-- https://github.com/rafamadriz/friendly-snippets
|
||||
|
|
@ -829,8 +835,14 @@ require('lazy').setup({
|
|||
},
|
||||
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'lazydev' },
|
||||
default = { 'copilot', 'lsp', 'path', 'snippets', 'lazydev' },
|
||||
providers = {
|
||||
copilot = {
|
||||
name = 'copilot',
|
||||
module = 'blink-cmp-copilot',
|
||||
score_offset = 100,
|
||||
async = true,
|
||||
},
|
||||
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,24 +2,19 @@ return {
|
|||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
event = 'InsertEnter',
|
||||
-- Load before nvim-cmp to ensure copilot is ready
|
||||
priority = 100,
|
||||
config = function()
|
||||
require('copilot').setup {
|
||||
suggestion = {
|
||||
dependencies = {
|
||||
'copilotlsp-nvim/copilot-lsp',
|
||||
},
|
||||
opts = {
|
||||
nes = {
|
||||
enabled = true,
|
||||
auto_trigger = true, -- Need to trigger to get suggestions for copilot-cmp
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
accept = false, -- Disable accept keymap, use copilot-cmp instead
|
||||
accept_word = false,
|
||||
accept_line = false,
|
||||
next = '<M-]>',
|
||||
prev = '<M-[>',
|
||||
dismiss = '<C-]>',
|
||||
accept_and_goto = '<leader>p',
|
||||
accept = false,
|
||||
dismiss = '<Esc>',
|
||||
},
|
||||
},
|
||||
panel = { enabled = true },
|
||||
}
|
||||
end,
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue