Remap Github Copilot Autocompletion

This commit is contained in:
Jacob Hoopes 2023-05-15 15:51:34 -06:00 committed by ninp0
parent 37808a6f6e
commit 76182ae8a0
No known key found for this signature in database
GPG key ID: BE3BFB8DB0831F93
2 changed files with 30 additions and 0 deletions

View file

@ -41,6 +41,24 @@ P.S. You can delete this when you're done too. It's your config now :)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.copilot_no_tab_map = true
vim.api.nvim_set_keymap("i", "<C-J>", 'copilot#Accept("<CR>")', { silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-H>", 'copilot#Previous()', { silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-K>", 'copilot#Next()', { silent = true, expr = true })
vim.g.copilot_filetypes = {
["*"] = false,
["c"] = true,
["c++"] = true,
["go"] = true,
["javascript"] = true,
["typescript"] = true,
["java"] = true,
["lua"] = false,
["ruby"] = true,
["rust"] = true,
["python"] = true,
}
-- Install package manager
-- https://github.com/folke/lazy.nvim
-- `:help lazy.nvim.txt` for more info