feat: Update config

This commit is contained in:
Xavier Logerais
2023-05-23 19:35:54 +02:00
parent bc865e43e0
commit a5cf46b093
7 changed files with 147 additions and 48 deletions

View File

@ -2,34 +2,35 @@
-- Official plugin
-- https://docs.github.com/fr/copilot/getting-started-with-github-copilot?tool=neovim
-- return {
-- {
-- "github/copilot.vim",
-- config = function()
-- require("_copilot").setup() -- NOT WORKING
-- end,
-- event = "InsertEnter",
-- },
-- }
--
-- Alternative plugin in pure lua
-- https://github.com/zbirenbaum/copilot.lua
return {
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
"github/copilot.vim",
event = "InsertEnter",
config = function()
require("copilot").setup()
end,
}
,
{
"zbirenbaum/copilot-cmp",
config = function()
require("copilot_cmp").setup()
end
keys = {
{ "<F12>", "<cmd>Copilot panel<CR>", mode = { "n", "i", "v" }, desc = "Display Copilot panel" },
-- { "<C-a>", "<cmd>copilot#Accept()<CR>", mode = "i", desc = "Accept Copilot solution", { silent = true, expr = true } },
},
}
-- imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")
-- let g:copilot_no_tab_map = v:true
-- Alternative plugin in pure lua
-- https://github.com/zbirenbaum/copilot.lua
-- return {
-- {
-- "zbirenbaum/copilot.lua",
-- config = function()
-- require("copilot").setup()
-- end,
-- cmd = "Copilot",
-- event = "InsertEnter",
-- }
-- ,
-- -- {
-- -- "zbirenbaum/copilot-cmp",
-- -- config = function()
-- -- require("copilot_cmp").setup()
-- -- end
-- -- }
}