Experiments with copilot
This commit is contained in:
parent
8e33c583bc
commit
bd633d9101
1 changed files with 54 additions and 0 deletions
54
lua/plugins/copilot.lua
Normal file
54
lua/plugins/copilot.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
-- Copilot LLM Completions
|
||||
-- https://github.com/jacobdot/copilot.nvim
|
||||
|
||||
-- Config as of 2024-08-04
|
||||
return {
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
event = 'InsertEnter',
|
||||
config = function()
|
||||
require('copilot').setup {
|
||||
panel = {
|
||||
enabled = false,
|
||||
auto_refresh = false,
|
||||
keymap = {
|
||||
jump_prev = false, -- Originally '[['
|
||||
jump_next = false, -- Originally ']]'
|
||||
accept = '<CR>',
|
||||
refresh = false, -- Originally 'gr'
|
||||
open = false, --Originally '<M-CR>'
|
||||
},
|
||||
layout = {
|
||||
position = 'right', -- | top | left | right
|
||||
ratio = 0.4,
|
||||
},
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
accept = '<M-y>',
|
||||
accept_word = '<M-h>',
|
||||
accept_line = '<M-l>',
|
||||
next = '<M-j>',
|
||||
prev = '<M-k>',
|
||||
dismiss = false,
|
||||
},
|
||||
},
|
||||
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,
|
||||
}
|
Loading…
Reference in a new issue