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_luasnip
|
||||
comment-nvim
|
||||
copilot-cmp
|
||||
copilot-lua
|
||||
dashboard-nvim
|
||||
lsp_lines-nvim
|
||||
lspkind-nvim
|
||||
|
|
|
@ -93,6 +93,11 @@ require("nvim-treesitter.configs").setup({
|
|||
})
|
||||
|
||||
local lspkind = require("lspkind")
|
||||
lspkind.init({
|
||||
symbol_map = {
|
||||
Copilot = "",
|
||||
},
|
||||
})
|
||||
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
@ -136,9 +141,10 @@ cmp.setup({
|
|||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "buffer", priority = 1 },
|
||||
{ name = "copilot", priority = 8 },
|
||||
{ name = "luasnip", priority = 7 },
|
||||
{ name = "nvim_lsp", priority = 9 },
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -381,3 +387,9 @@ require("nvim-treesitter.configs").setup({
|
|||
keymaps = { ["."] = "textsubjects-smart" },
|
||||
},
|
||||
})
|
||||
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
require("copilot_cmp").setup()
|
||||
|
|
Loading…
Reference in a new issue