feat(nvim): add github copilot

This commit is contained in:
Michael Mandl 2023-07-05 12:54:27 +02:00
parent 03e4b4d25c
commit 0141de5795
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
3 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,6 @@
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
})
require('copilot_cmp').setup({})

View file

@ -148,6 +148,10 @@ in
# debugging
nvim-dap
nvim-dap-ui
# copilot
copilot-lua
copilot-cmp
];
extraConfig = ''
@ -185,6 +189,8 @@ in
vim.g.gitblame_date_format = "%r"
${builtins.readFile ./copilot.lua }
EOF
'';
};

View file

@ -15,6 +15,7 @@ cmp.setup({
end
},
sources = cmp.config.sources({
{ name = "copilot" },
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "luasnip" },
@ -59,6 +60,7 @@ cmp.setup({
fields = { "menu", "abbr", "kind" },
format = function(entry, item)
local menu_icon = {
copilot = "",
nvim_lsp = "λ",
luasnip = "",
buffer = "Ω",