add dap keybinds

This commit is contained in:
Aditya 2024-03-01 15:41:45 +05:30
parent 70b56a6e87
commit d5a39ce566
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU

View file

@ -30,4 +30,173 @@
};
};
};
keymaps = [
{
mode = "n";
key = "<leader>dB";
action = "
<cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>
";
options = {
silent = true;
desc = "Breakpoint Condition";
};
}
{
mode = "n";
key = "<leader>db";
action = ":DapToggleBreakpoint<cr>";
options = {
silent = true;
desc = "Toggle Breakpoint";
};
}
{
mode = "n";
key = "<leader>dc";
action = ":DapCOntinue";
options = {
silent = true;
desc = "Continue";
};
}
{
mode = "n";
key = "<leader>da";
action = "<cmd>lua require('dap').continue({ before = get_args })<cr>";
options = {
silent = true;
desc = "Run with Args";
};
}
{
mode = "n";
key = "<leader>dC";
action = "<cmd>lua require('dap').run_to_cursor()<cr>";
options = {
silent = true;
desc = "Run to cursor";
};
}
{
mode = "n";
key = "<leader>dg";
action = "<cmd>lua require('dap').goto_()<cr>";
options = {
silent = true;
desc = "Go to line (no execute)";
};
}
{
mode = "n";
key = "<leader>di";
action = "
<cmd>lua require('dap').down()<cr>
";
options = {
silent = true;
desc = "Down";
};
}
{
mode = "n";
key = "<leader>dk";
action = "<cmd>lua require('dap').up()<cr>";
options = {
silent = true;
desc = "Up";
};
}
{
mode = "n";
key = "<leader>dl";
action = "<cmd>lua require('dap').run_last()<cr>";
options = {
silent = true;
desc = "Run Last";
};
}
{
mode = "n";
key = "<leader>do";
action = ":DapStepOut<cr>";
options = {
silent = true;
desc = "Step Out";
};
}
{
mode = "n";
key = "<leader>dO";
action = ":DapStepOver<cr>";
options = {
silent = true;
desc = "Step Over";
};
}
{
mode = "n";
key = "<leader>dp";
action = "<cmd> lua require('dap').pause()<cr>";
options = {
silent = true;
desc = "Pause";
};
}
{
mode = "n";
key = "<leader>dr";
action = ":DapToggleRepl<cr>";
options = {
silent = true;
desc = "Toggle REPL";
};
}
{
mode = "n";
key = "<leader>ds";
action = "<cmd>lua require('dap').session()<cr>";
options = {
silent = true;
desc = "Session";
};
}
{
mode = "n";
key = "<leader>dt";
action = ":DapTerminate<cr>";
options = {
silent = true;
desc = "Terminate";
};
}
{
mode = "n";
key = "<leader>du";
action = "<cmd> lua require('dapui').toggle()<cr>";
options = {
silent = true;
desc = "Dap UI";
};
}
{
mode = "n";
key = "<leader>dw";
action = "<cmd>lua require('dap.ui.widgets').hover()<cr>";
options = {
silent = true;
desc = "Widgets";
};
}
{
mode = ["n" "v"];
key = "<leader>de";
action = "<cmd>lua require('dapui').eval()<cr>";
options = {
silent = true;
desc = "Eval";
};
}
];
}