mirror of
https://github.com/akr2002/nv.git
synced 2024-12-29 01:12:53 +00:00
202 lines
4 KiB
Nix
202 lines
4 KiB
Nix
{
|
|
plugins.dap = {
|
|
enable = true;
|
|
signs = {
|
|
dapBreakpoint = {
|
|
text = "●";
|
|
texthl = "DapBreakpoint";
|
|
};
|
|
dapBreakpointCondition = {
|
|
text = "●";
|
|
texthl = "DapBreakpointCondition";
|
|
};
|
|
dapLogPoint = {
|
|
text = "◆";
|
|
texthl = "DapLogPoint";
|
|
};
|
|
};
|
|
extensions = {
|
|
dap-python = {
|
|
enable = true;
|
|
};
|
|
dap-ui = {
|
|
enable = true;
|
|
floating.mappings = {
|
|
close = ["<ESC>" "q"];
|
|
};
|
|
};
|
|
dap-virtual-text = {
|
|
enable = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
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";
|
|
};
|
|
}
|
|
];
|
|
}
|