dotfiles/.config/nvim/lua/custom/mappings.lua
2023-10-09 14:32:15 +02:00

68 lines
1.1 KiB
Lua

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