nvim: add copilot
This commit is contained in:
parent
2bc3938654
commit
819590103d
2 changed files with 17 additions and 3 deletions
|
@ -51,6 +51,8 @@ in
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
cmp_luasnip
|
cmp_luasnip
|
||||||
comment-nvim
|
comment-nvim
|
||||||
|
copilot-cmp
|
||||||
|
copilot-lua
|
||||||
dashboard-nvim
|
dashboard-nvim
|
||||||
lsp_lines-nvim
|
lsp_lines-nvim
|
||||||
lspkind-nvim
|
lspkind-nvim
|
||||||
|
|
|
@ -93,6 +93,11 @@ require("nvim-treesitter.configs").setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
local lspkind = require("lspkind")
|
local lspkind = require("lspkind")
|
||||||
|
lspkind.init({
|
||||||
|
symbol_map = {
|
||||||
|
Copilot = "",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
|
@ -136,9 +141,10 @@ cmp.setup({
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
}),
|
}),
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "nvim_lsp" },
|
{ name = "buffer", priority = 1 },
|
||||||
{ name = "luasnip" },
|
{ name = "copilot", priority = 8 },
|
||||||
{ name = "buffer" },
|
{ name = "luasnip", priority = 7 },
|
||||||
|
{ name = "nvim_lsp", priority = 9 },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -381,3 +387,9 @@ require("nvim-treesitter.configs").setup({
|
||||||
keymaps = { ["."] = "textsubjects-smart" },
|
keymaps = { ["."] = "textsubjects-smart" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require("copilot").setup({
|
||||||
|
suggestion = { enabled = false },
|
||||||
|
panel = { enabled = false },
|
||||||
|
})
|
||||||
|
require("copilot_cmp").setup()
|
||||||
|
|
Loading…
Reference in a new issue