mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
100 lines
2 KiB
Lua
100 lines
2 KiB
Lua
return {
|
|
{
|
|
"zbirenbaum/copilot.lua",
|
|
cmd = "Copilot",
|
|
keys = {
|
|
{
|
|
'M-\\',
|
|
'<cmd>Copilot panel<CR>',
|
|
noremap = true,
|
|
desc = 'Copilot panel'
|
|
}
|
|
},
|
|
opts = {
|
|
panel = {
|
|
enabled = true,
|
|
auto_refresh = true,
|
|
keymap = {
|
|
jump_prev = "<C-p>",
|
|
jump_next = "<C-n>",
|
|
accept = "<C-y>",
|
|
}
|
|
},
|
|
suggestion = {
|
|
enabled = true,
|
|
auto_trigger = true,
|
|
hide_during_completion = true,
|
|
keymap = {
|
|
accept = "<M-]>",
|
|
next = "<M-[>",
|
|
},
|
|
},
|
|
completion = {
|
|
documentation = {
|
|
auto_show = true,
|
|
},
|
|
list = {
|
|
selection = {
|
|
preselect = false,
|
|
auto_insert = true,
|
|
}
|
|
},
|
|
accept = {
|
|
auto_brackets = {
|
|
enabled = true
|
|
}
|
|
},
|
|
},
|
|
filetypes = {
|
|
go = true,
|
|
lua = true,
|
|
php = true,
|
|
python = true,
|
|
ruby = true,
|
|
sh = true,
|
|
puppet = true,
|
|
yaml = true,
|
|
markdown = true,
|
|
["."] = false,
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"olimorris/codecompanion.nvim",
|
|
cmd = "Copilot",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-treesitter/nvim-treesitter",
|
|
"zbirenbaum/copilot.lua",
|
|
},
|
|
opts = {
|
|
strategies = {
|
|
chat = { adapter = "copilot", },
|
|
inline = { adapter = "copilot", },
|
|
},
|
|
},
|
|
keys = {
|
|
{
|
|
'<leader>ac',
|
|
'<cmd>CodeCompanionChat Toggle<CR>',
|
|
noremap = true,
|
|
desc = 'Copilot chat toggle'
|
|
},
|
|
{
|
|
'<leader>as',
|
|
'<cmd>CodeCompanionChat Add<CR>',
|
|
noremap = true,
|
|
mode = { "n", "v" },
|
|
desc = 'Copilot chat add selection'
|
|
},
|
|
{
|
|
'<leader>aa',
|
|
'<cmd>CodeCompanionActions<CR>',
|
|
noremap = true,
|
|
mode = { "n", "v" },
|
|
desc = 'Copilot inline'
|
|
}
|
|
}
|
|
|
|
},
|
|
}
|