neovim/lua/weeheavy/plugins/copilot.lua
2024-03-07 10:41:04 +01:00

54 lines
1.1 KiB
Lua

-- Fully featured & enhanced replacement for copilot.vim complete with API for
-- interacting with Github Copilot
-- https://github.com/zbirenbaum/copilot.lua
return {
"zbirenbaum/copilot.lua",
lazy = true,
event = "InsertEnter",
config = function()
local copilot = require("copilot")
copilot.setup({
panel = {
enabled = false,
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 = false,
auto_trigger = false,
debounce = 75,
keymap = {
accept = "<M-l>",
accept_word = false,
accept_line = false,
next = "<M-]>",
prev = "<M-[>",
dismiss = "<C-]>",
},
},
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 > 18.x
server_opts_overrides = {},
})
end,
}