Skip to content

Instantly share code, notes, and snippets.

@cbioley
Forked from ianchesal/overrides.lua
Created May 16, 2023 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbioley/25921619e1454a0fa1120a8cbf83739c to your computer and use it in GitHub Desktop.
Save cbioley/25921619e1454a0fa1120a8cbf83739c 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