add ctrl+j to accept copilot

This commit is contained in:
frumsy 2023-11-18 14:01:28 -05:00
parent 65e81d3c0b
commit 6c3ee1bd39
1 changed files with 3 additions and 0 deletions

View File

@ -385,6 +385,9 @@ vim.api.nvim_set_keymap('v', 'X', '"_X', { noremap = true })
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- add accept copilot suggestion using: ctrl+enter
vim.g.copilot_no_tab_map = true
vim.api.nvim_set_keymap("i", '<C-j>', 'copilot#Accept("<CR>")', { silent = true, expr = true })
-- make ctrl+backspace work in vscode
-- lhs code is associated with whatever terminal (kitty in my case) sends to neovim