nvchad-config/lua/custom/mappings.lua

58 lines
1.1 KiB
Lua

local M = {}
M.general = {
n = {
["<C-h>"] = { "<cmd> TmuxNavigateLeft<CR>", "window left" },
["<C-l>"] = { "<cmd> TmuxNavigateRight<CR>", "window right" },
["<C-j>"] = { "<cmd> TmuxNavigateDown<CR>", "window down" },
["<C-k>"] = { "<cmd> TmuxNavigateUp<CR>", "window up" },
}
}
M.dap = {
plugin = true,
n = {
["<leader>db"] = { "<cmd> DapToggleBreakpoint <CR>" },
["<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>dgr"] = {
function()
require('dap-go').debug_test()
end,
"Debug go test"
},
["<leader>dgl"] = {
function()
require('dap-go').debug_last()
end,
"Debug last go test"
}
}
}
M.crates = {
plugin = true,
n = {
["<leader>rcu"] = {
function ()
require('crates').upgrade_all_crates()
end,
"update crates"
}
}
}
return M