dotfiles/dot_config/nvim/lua/custom/mappings.lua

51 lines
821 B
Lua

local M = {}
M.dap = {
plugin = true,
n = {
["<leader>db"] = {
"<cmd> DapToggleBreakpoint <CR>",
"Add breakpoint at line"
},
["<leader>dus"] = {
function ()
local widgets = require('dap.ui.widgets');
local sidebar = widgets.sidebar(widgets.scopes);
sidebar.open();
end,
"Open debugging sidebar"
}
}
}
M.dap_go = {
plugin = true,
n = {
["<leader>dgt"] = {
function()
require("dap-go").debug_test()
end,
"Debug go test"
},
["<leader>dgl"] = {
function()
require("dap-go").debug_last()
end,
"Debug last go test"
},
}
}
M.terminal = {
t = {
["<Esc>"] = {"<C-\\><C-n>"}
}
}
M.general = {
i = {
["<C-a>"] = { "<ESC>^i", "Beginning of line" },
}
}
return M