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-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

View file

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