nv/config/dap/dap.nix

203 lines
4 KiB
Nix
Raw Normal View History

2024-03-01 09:45:33 +00:00
{
plugins.dap = {
2024-04-05 05:18:13 +00:00
enable = false;
2024-03-01 09:45:33 +00:00
signs = {
dapBreakpoint = {
text = "";
texthl = "DapBreakpoint";
};
dapBreakpointCondition = {
text = "";
texthl = "DapBreakpointCondition";
};
dapLogPoint = {
text = "";
texthl = "DapLogPoint";
};
};
2024-03-01 10:18:28 +00:00
extensions = {
2024-03-01 09:45:33 +00:00
dap-python = {
enable = true;
};
dap-ui = {
enable = true;
floating.mappings = {
close = ["<ESC>" "q"];
};
};
dap-virtual-text = {
enable = true;
};
};
};
2024-03-01 10:11:45 +00:00
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";
};
}
];
2024-03-01 09:45:33 +00:00
}