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" require "nvchad.mappings"
local M = {} local map = vim.keymap.set
M.dap = { --
plugin = true, -- restore shift-y line copy
n = { map('n', 'Y', 'Y')
["<leader>db"] = {"<cmd> DapToggleBreakpoint <CR>"}
}
}
M.dap_python = { --
plugin = true, -- Copilot mappings
n = { map('i', '<C-]>', 'copilot#Accept("\\<CR>")', {
["<leader>dpr"] = { expr = true,
function() replace_keycodes = false
require('dap-python').test_method() })
end map('i', '<C-\\>', '<Plug>(copilot-accept-word)')
} map('i', '<C-S-Right>', '<Plug>(copilot-accept-word)')
}
}
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

View File

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