Remap Github Copilot Autocompletion
This commit is contained in:
parent
37808a6f6e
commit
76182ae8a0
2 changed files with 30 additions and 0 deletions
18
init.lua
18
init.lua
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue