nix-config/rsc/config/nvim/mappings.lua

69 lines
1.1 KiB
Lua
Raw Normal View History

2023-11-04 14:57:21 +01:00
local M = {}
M.dap = {
plugin = true,
n = {
["<leader>db"] = {
"<cmd> DapToggleBreakpoint <CR>",
"Add breakpoint at line"
},
["<leader>dr"] = {
"<cmd> DapContinue <CR>",
"Start or continue the debugger",
},
["<leader>dus"] = {
function ()
local widgets = require('dap.ui.widgets');
local sidebar = widgets.sidebar(widgets.scopes);
sidebar.open();
end,
"Open debugging sidebar"
},
["<F5>"] = {
function ()
require("dap").continue()
end
},
["<F10>"] = {
function ()
require("dap").step_over()
end
},
["<F11>"] = {
function ()
require("dap").step_into()
end
},
["<F12>"] = {
function ()
require("dap").step_out()
end
},
}
}
M.dap_python = {
plugin = true,
n = {
["<leader>dpr"] = {
function()
require('dap-python').test_method()
end
},
}
}
M.crates = {
plugin = true,
n = {
["<leader>rcu"] = {
function ()
require('crates').upgrade_all_crates()
end,
"update crates"
}
}
}
return M