Skip to content

Instantly share code, notes, and snippets.

@rsansores
Forked from ianchesal/overrides.lua
Created December 7, 2023 19:27
Show Gist options
  • Save rsansores/78861c1cee514604e67502d973515e54 to your computer and use it in GitHub Desktop.
Save rsansores/78861c1cee514604e67502d973515e54 to your computer and use it in GitHub Desktop.
copilot.lua + copilot-cmp in NvChad
-- Add the following in your custom/configs/overrides.lua file. You can configure copilot to meet your needs here.
M.copilot = {
-- Possible configurable fields can be found on:
-- https://github.com/zbirenbaum/copilot.lua#setup-and-configuration
suggestion = {
enable = false,
},
panel = {
enable = false,
},
}
-- Add the following blocks in to your custom/plugins.lua file to install the plugins
local plugings = {
-- ... all your other plugins ...
{
"zbirenbaum/copilot.lua",
event = "InsertEnter",
opts = overrides.copilot,
},
{
"hrsh7th/nvim-cmp",
dependencies = {
{
"zbirenbaum/copilot-cmp",
config = function()
require("copilot_cmp").setup()
end,
},
},
opts = {
sources = {
{ name = "nvim_lsp", group_index = 2 },
{ name = "copilot", group_index = 2 },
{ name = "luasnip", group_index = 2 },
{ name = "buffer", group_index = 2 },
{ name = "nvim_lua", group_index = 2 },
{ name = "path", group_index = 2 },
},
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment