feat(nvim): enable CopilotChat
This commit is contained in:
parent
cc92efac9a
commit
2cca40f5e8
2 changed files with 16 additions and 11 deletions
|
@ -84,10 +84,12 @@
|
|||
none-ls-nvim
|
||||
lsp_lines-nvim
|
||||
lsp-inlayhints-nvim
|
||||
lspkind-nvim
|
||||
|
||||
# Copilot
|
||||
copilot-lua
|
||||
copilot-cmp
|
||||
CopilotChat-nvim
|
||||
|
||||
# debugging
|
||||
nvim-dap
|
||||
|
@ -171,6 +173,8 @@
|
|||
require("neogen").setup({ snippet_engine = "luasnip" })
|
||||
|
||||
require("local_firenvim")
|
||||
|
||||
require("CopilotChat").setup()
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,6 +9,7 @@ local cmp = require("cmp")
|
|||
local luasnip = require("luasnip")
|
||||
local copilot_lua = require("copilot")
|
||||
local copilot_cmp = require("copilot_cmp")
|
||||
local lspkind = require("lspkind")
|
||||
|
||||
copilot_lua.setup({})
|
||||
copilot_cmp.setup({})
|
||||
|
@ -62,18 +63,18 @@ cmp.setup({
|
|||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
fields = { "menu", "abbr", "kind" },
|
||||
format = function(entry, item)
|
||||
local menu_icon = {
|
||||
nvim_lsp = "λ",
|
||||
luasnip = "⋗",
|
||||
buffer = "Ω",
|
||||
path = "🖿",
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol",
|
||||
maxwidth = {
|
||||
menu = 50,
|
||||
abbr = 50,
|
||||
},
|
||||
ellipsis_char = "...",
|
||||
show_labelDetails = true,
|
||||
symbol_map = {
|
||||
Copilot = "",
|
||||
}
|
||||
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue