Improved debugging

This commit is contained in:
Fred Drake
2024-10-02 17:25:25 -04:00
parent 1b8b135353
commit 10acaf2001
3 changed files with 37 additions and 26 deletions
+11 -8
View File
@@ -1,9 +1,12 @@
{
plugins.dap = {
enable = true;
extensions = {
dap-ui.enable = true;
dap-virtual-text.enable = true;
};
};
{ pkgs, ... }: {
extraConfigLua = ''
local dap = require('dap')
dap.adapters.coreclr = {
type = 'executable',
command = '${pkgs.netcoredbg}/bin/netcoredbg',
args = {'--interpreter=vscode'}
}
'';
}
+14 -4
View File
@@ -1,4 +1,4 @@
{
{ pkgs, ... }: {
plugins = {
cmp-dap.enable = true;
dap = {
@@ -12,15 +12,15 @@
};
signs = {
dapBreakpoint = {
text = "";
text = "";
texthl = "DapBreakpoint";
};
dapBreakpointCondition = {
text = "";
text = "";
texthl = "DapBreakpointCondition";
};
dapLogPoint = {
text = "";
text = "";
texthl = "DapLogPoint";
};
};
@@ -200,11 +200,21 @@
desc = "Eval";
};
}
{
mode = "n";
key = "<leader>df";
action =
"<CMD>lua require('dap.ext.vscode').load_launchjs()<CR><CMD>Telescope dap configurations<CR>";
options = { desc = "Debug Configurations"; };
}
];
# Allow DAP UI to automatically open and close when possible
extraConfigLua = ''
require('dap').listeners.after.event_initialized['dapui_config'] = require('dapui').open
require('dap').listeners.before.event_terminated['dapui_config'] = require('dapui').close
require('dap').listeners.before.event_exited['dapui_config'] = require('dapui').close
'';
extraPlugins = [ (pkgs.vimPlugins.telescope-dap-nvim) ];
}
+12 -14
View File
@@ -125,6 +125,18 @@
"<CMD>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<CR>";
options = { desc = "Goto T[y]pe Definition"; };
}
{
mode = "n";
key = "D";
action = "<CMD>lua vim.diagnostic.open_float()<CR>";
options = { desc = "Popup Diagnostics"; };
}
{
mode = "n";
key = "<leader>cd";
action = "<CMD>Trouble diagnostics toggle<CR>";
options = { desc = "List All Diagnostics"; };
}
# SOPS
{
@@ -293,19 +305,5 @@
action = "<CMD>BufferLineCloseLeft<CR>";
options = { desc = "Delete Buffers to the Left"; };
}
# Code Actions
{
mode = "n";
key = "H";
action = "<CMD>lua vim.diagnostic.open_float()<CR>";
options = { desc = "Popup Diagnostics"; };
}
{
mode = "n";
key = "<leader>cd";
action = "<CMD>Trouble diagnostics toggle<CR>";
options = { desc = "List All Diagnostics"; };
}
];
}