Nvim: setup cmp for copilot
This commit is contained in:
parent
2a6e453156
commit
b36e9f5393
2 changed files with 14 additions and 1 deletions
|
@ -8,6 +8,9 @@ return function()
|
|||
|
||||
-- Setup git completion source
|
||||
require("cmp_git").setup()
|
||||
--
|
||||
-- Setup copilot source
|
||||
require("copilot_cmp").setup()
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
|
@ -49,6 +52,7 @@ return function()
|
|||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "luasnip" },
|
||||
|
|
|
@ -130,6 +130,7 @@ local plugins = {
|
|||
"hrsh7th/cmp-cmdline", -- cmdline source
|
||||
"saadparwaiz1/cmp_luasnip", -- Snippets source
|
||||
"f3fora/cmp-spell", -- Spell check source
|
||||
"zbirenbaum/copilot-cmp", -- Copilot source
|
||||
},
|
||||
config = require("plugins.cmp"),
|
||||
},
|
||||
|
@ -221,7 +222,15 @@ local plugins = {
|
|||
},
|
||||
|
||||
-- GitHub Copilot
|
||||
{ "zbirenbaum/copilot.lua", config = true },
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
config = function()
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
local lazy_opts = {}
|
||||
|
|
Loading…
Reference in a new issue