-
-
Save clarksun/92ddfff5036cd640ef82e8b79db51885 to your computer and use it in GitHub Desktop.
copilot.lua + copilot-cmp in NvChad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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, | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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