Fixed up copilot and added copilot chat

This commit is contained in:
Jimmy Bates 2024-06-30 05:04:40 -07:00
parent ea09729865
commit de2044b7e8
5 changed files with 58 additions and 12 deletions

View file

@ -1,13 +1,27 @@
return {
'github/copilot.vim',
'zbirenbaum/copilot.lua',
lazy = false,
init = function()
local map = vim.api.nvim_set_keymap
map('i', '<C-o>', 'copilot#Accept("<CR>")', { expr = true, silent = true })
vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true
vim.g.copilot_tab_fallback = ''
end,
cmd = 'Copilot',
event = 'InsertEnter',
opts = {
panel = {
auto_refresh = true,
layout = {
position = 'right',
ratio = 0.3,
},
keymap = {
open = '<C-S-O>',
},
},
suggestion = {
auto_trigger = false,
keymap = {
accept = '<C-o>',
next = '<C-i>',
dismiss = '<C-d>',
prev = '<C-S-i>',
},
},
},
}