config-astronvim/lua/user/plugins/copilot.lua

37 lines
1005 B
Lua
Raw Normal View History

2023-05-11 18:41:27 +02:00
-- Github Copilot
-- Official plugin
-- https://docs.github.com/fr/copilot/getting-started-with-github-copilot?tool=neovim
return {
{
2023-05-23 19:35:54 +02:00
"github/copilot.vim",
2023-05-11 18:41:27 +02:00
event = "InsertEnter",
2023-05-23 19:35:54 +02:00
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 } },
},
2023-05-11 18:41:27 +02:00
}
2023-05-23 19:35:54 +02:00
-- 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
-- -- }
2023-05-11 18:41:27 +02:00
}