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