Update and clean up mappings

This commit is contained in:
Daniele Viganò 2024-10-25 16:44:23 +02:00
parent 5782fd24e6
commit 8dbc0f7a96
2 changed files with 12 additions and 35 deletions

View File

@ -1,35 +1,15 @@
require "nvchad.mappings"
local M = {}
local map = vim.keymap.set
M.dap = {
plugin = true,
n = {
["<leader>db"] = {"<cmd> DapToggleBreakpoint <CR>"}
}
}
--
-- restore shift-y line copy
map('n', 'Y', 'Y')
M.dap_python = {
plugin = true,
n = {
["<leader>dpr"] = {
function()
require('dap-python').test_method()
end
}
}
}
M.copilot = {
n = {
["<C-l>"] = {
function()
vim.fn.feedkeys(vim.fn['copilot#Accept'](), '')
end,
"Copilot Accept",
{replace_keycodes = true, nowait=true, silent=true, expr=true, noremap=true}
}
}
}
return M
--
-- Copilot mappings
map('i', '<C-]>', 'copilot#Accept("\\<CR>")', {
expr = true,
replace_keycodes = false
})
map('i', '<C-\\>', '<Plug>(copilot-accept-word)')
map('i', '<C-S-Right>', '<Plug>(copilot-accept-word)')

View File

@ -2,9 +2,6 @@ local autocmd = vim.api.nvim_create_autocmd
vim.opt.fillchars = { }
--
-- restore shift-y line copy
vim.keymap.set('n', 'Y', 'Y')
--
-- enable nvim intro
-- vim.opt.shortmess = "filnxtToO"
vim.opt.whichwrap:remove "<>[]hl"