85 lines
2.0 KiB
Lua
85 lines
2.0 KiB
Lua
return {
|
|
{
|
|
"zbirenbaum/copilot.lua",
|
|
cmd = "Copilot",
|
|
event = "InsertEnter",
|
|
config = function()
|
|
require("copilot").setup({
|
|
panel = {
|
|
enabled = true,
|
|
auto_refresh = false,
|
|
keymap = {
|
|
jump_prev = "[[",
|
|
jump_next = "]]",
|
|
accept = "<CR>",
|
|
refresh = "gr",
|
|
open = "<M-CR>",
|
|
},
|
|
layout = {
|
|
position = "bottom", -- | top | left | right
|
|
ratio = 0.4,
|
|
},
|
|
},
|
|
suggestion = {
|
|
enabled = true,
|
|
auto_trigger = true, -- Enable auto-trigger suggestions as you type
|
|
debounce = 75,
|
|
keymap = {
|
|
accept = "<M-l>",
|
|
accept_word = false,
|
|
accept_line = false,
|
|
next = "<leader>]", -- Use leader key for next suggestion
|
|
prev = "<leader>[", -- Use leader key for previous suggestion
|
|
dismiss = "<C-]>",
|
|
},
|
|
},
|
|
filetypes = {
|
|
markdown = true,
|
|
help = true,
|
|
gitcommit = true,
|
|
gitrebase = true,
|
|
hgcommit = true,
|
|
svn = true,
|
|
cvs = true,
|
|
["."] = true,
|
|
},
|
|
copilot_node_command = "node", -- Node.js version must be > 16.x
|
|
server_opts_overrides = {},
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
"zbirenbaum/copilot-cmp",
|
|
dependencies = { "zbirenbaum/copilot.lua" },
|
|
config = function()
|
|
require("copilot_cmp").setup()
|
|
end,
|
|
},
|
|
{
|
|
"olimorris/codecompanion.nvim",
|
|
dependencies = {
|
|
"zbirenbaum/copilot.lua",
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-telescope/telescope.nvim",
|
|
},
|
|
cmd = { "CodeCompanion" },
|
|
config = function()
|
|
require("codecompanion").setup({
|
|
-- Use GitHub Copilot as the provider
|
|
providers = {
|
|
copilot = {
|
|
enabled = true,
|
|
},
|
|
},
|
|
-- Configure the UI
|
|
ui = {
|
|
window = {
|
|
width = 0.8,
|
|
height = 0.8,
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
}
|