feat: add copilot plugin

main
Ian Mancini 1 year ago
parent 4a8fdefcde
commit b5a068737f

@ -87,6 +87,10 @@ return require("packer").startup(function()
"hrsh7th/cmp-omni", "hrsh7th/cmp-omni",
"petertriho/cmp-git", "petertriho/cmp-git",
"hrsh7th/cmp-nvim-lsp-signature-help", "hrsh7th/cmp-nvim-lsp-signature-help",
{
"zbirenbaum/copilot-cmp",
requires = { "zbirenbaum/copilot.lua" },
},
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
config = [[require('plugins.nvim-cmp')]], config = [[require('plugins.nvim-cmp')]],

@ -33,10 +33,6 @@ cmp.setup({
end, end,
}), }),
}, },
experimental = {
ghost_text = true,
native_menu = false,
},
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4), ["<C-f>"] = cmp.mapping.scroll_docs(4),
@ -69,33 +65,25 @@ cmp.setup({
end end
end, { "i", "s" }), end, { "i", "s" }),
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ { name = "copilot" },
name = "nvim_lsp", { name = "nvim_lsp" },
}, { name = "luasnip" },
{ { name = "nvim_lsp_signature_help" },
name = "luasnip", { name = "nvim_lua" },
}, { name = "orgmode" },
{ { name = "path" },
name = "nvim_lsp_signature_help", { name = "buffer" },
}, }),
{ })
name = "nvim_lua",
},
{
name = "orgmode",
},
}, {
{ name = "git" }, -- Set configuration for specific filetype.
}, { cmp.setup.filetype("gitcommit", {
{ sources = cmp.config.sources({
name = "path", { name = "cmp_git" },
},
}, { }, {
{ { name = "buffer" },
name = "buffer",
},
}), }),
}) })
@ -124,3 +112,9 @@ cmp.setup.cmdline(":", {
}) })
require("cmp_git").setup() require("cmp_git").setup()
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
})
require("copilot_cmp").setup()

Loading…
Cancel
Save