dot/.config/nvim/lua/plugins/copilot.lua
2023-08-29 20:07:23 +02:00

52 lines
1 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 = "<C-a>",
refresh = "<C-r>",
open = "<C-w>",
},
layout = {
position = "bottom", -- | top | left | right
ratio = 0.4,
},
},
suggestion = {
enabled = true,
auto_trigger = true,
debounce = 80,
keymap = {
accept = "<C-a>",
accept_word = false,
accept_line = false,
next = "<C-q>",
prev = "<C-e>",
dismiss = "<C-d>",
},
},
filetypes = {
yaml = false,
markdown = false,
help = false,
gitcommit = false,
gitrebase = false,
hgcommit = false,
svn = false,
cvs = false,
["."] = false,
},
copilot_node_command = "node", -- Node.js version must be > 16.x
server_opts_overrides = {},
})
end,
},
}