You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.1 KiB
Lua
59 lines
1.1 KiB
Lua
local ok, copilot = pcall(require, 'copilot')
|
|
if not ok then
|
|
vim.notify("missing module copilot", vim.log.levels.WARN)
|
|
return
|
|
end
|
|
|
|
local M = {}
|
|
|
|
local config = {
|
|
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 = 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 > 16.x
|
|
server_opts_overrides = {},
|
|
}
|
|
|
|
M.setup = function()
|
|
copilot.setup(config)
|
|
end
|
|
|
|
return M
|
|
|