Skip to content

Commit

Permalink
update copilot conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ShortArrow committed Apr 11, 2024
1 parent b931d34 commit 4857326
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nvim/lua/config/_copilot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ M.setup = function()
vim.api.nvim_set_keymap("i", "<C-]>", "<Plug>(copilot-dismiss)", { silent = true })
vim.api.nvim_set_keymap("i", "<M-]>", "<Plug>(copilot-next)", { silent = true })
vim.api.nvim_set_keymap("i", "<M-[>", "<Plug>(copilot-previous)", { silent = true })
vim.api.nvim_set_keymap("i", "<C-g>", 'copilot#Accept("<CR>")', { silent = true, expr = true, script = true })
vim.api.nvim_set_keymap("i", "<C-j>", "<Plug>(copilot-next)", { silent = true })
vim.api.nvim_set_keymap("i", "<C-k>", "<Plug>(copilot-previous)", { silent = true })
vim.api.nvim_set_keymap("i", "<C-o>", "<Plug>(copilot-dismiss)", { silent = true })
vim.api.nvim_set_keymap("i", "<C-p>", "<Plug>(copilot-suggest)", { silent = true })
end

return M
1 change: 1 addition & 0 deletions nvim/lua/my/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local fonts = require('my.fonts')

M.activate = function()
g.mapleader = " "
g.copilot_no_tab_map = true -- GitHub Copilot
opt.number = true
opt.relativenumber = true
opt.termguicolors = true
Expand Down

0 comments on commit 4857326

Please sign in to comment.