mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-25 14:01:03 +00:00
Add copilot
This commit is contained in:
parent
a48af40c68
commit
d0940f2b4d
1 changed files with 16 additions and 0 deletions
|
|
@ -39,6 +39,20 @@ return {
|
||||||
"hrsh7th/cmp-path", -- Path completions
|
"hrsh7th/cmp-path", -- Path completions
|
||||||
"hrsh7th/cmp-cmdline", -- Cmdline completions
|
"hrsh7th/cmp-cmdline", -- Cmdline completions
|
||||||
"saadparwaiz1/cmp_luasnip", -- Snippet completions
|
"saadparwaiz1/cmp_luasnip", -- Snippet completions
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
build = ":Copilot auth",
|
||||||
|
opts = {
|
||||||
|
suggestion = { enabled = false },
|
||||||
|
panel = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
dependencies = "copilot.lua",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
version = "v2.*",
|
version = "v2.*",
|
||||||
|
|
@ -96,6 +110,7 @@ return {
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot" },
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
|
|
@ -111,6 +126,7 @@ return {
|
||||||
nvim_lsp = "[LSP]",
|
nvim_lsp = "[LSP]",
|
||||||
luasnip = "[Snippet]",
|
luasnip = "[Snippet]",
|
||||||
path = "[Path]",
|
path = "[Path]",
|
||||||
|
copilot = "[Copilot]",
|
||||||
})[entry.source.name]
|
})[entry.source.name]
|
||||||
return vim_item
|
return vim_item
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue