nvim: add copilot

This commit is contained in:
Moritz Böhme 2023-02-18 16:23:58 +01:00
parent 2bc3938654
commit 819590103d
Signed by: moritz
GPG key ID: 970C6E89EB0547A9
2 changed files with 17 additions and 3 deletions

View file

@ -51,6 +51,8 @@ in
cmp-nvim-lsp
cmp_luasnip
comment-nvim
copilot-cmp
copilot-lua
dashboard-nvim
lsp_lines-nvim
lspkind-nvim

View file

@ -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()