diff --git a/config/csharp/dap.nix b/config/csharp/dap.nix index b486754..6c36768 100644 --- a/config/csharp/dap.nix +++ b/config/csharp/dap.nix @@ -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'} + } + + ''; } diff --git a/config/dap.nix b/config/dap.nix index 2e8ad82..a48d6fc 100644 --- a/config/dap.nix +++ b/config/dap.nix @@ -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 = "df"; + action = + "lua require('dap.ext.vscode').load_launchjs()Telescope dap configurations"; + 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) ]; } diff --git a/config/keys.nix b/config/keys.nix index f9aaa07..7d3b156 100644 --- a/config/keys.nix +++ b/config/keys.nix @@ -125,6 +125,18 @@ "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true"; options = { desc = "Goto T[y]pe Definition"; }; } + { + mode = "n"; + key = "D"; + action = "lua vim.diagnostic.open_float()"; + options = { desc = "Popup Diagnostics"; }; + } + { + mode = "n"; + key = "cd"; + action = "Trouble diagnostics toggle"; + options = { desc = "List All Diagnostics"; }; + } # SOPS { @@ -293,19 +305,5 @@ action = "BufferLineCloseLeft"; options = { desc = "Delete Buffers to the Left"; }; } - - # Code Actions - { - mode = "n"; - key = "H"; - action = "lua vim.diagnostic.open_float()"; - options = { desc = "Popup Diagnostics"; }; - } - { - mode = "n"; - key = "cd"; - action = "Trouble diagnostics toggle"; - options = { desc = "List All Diagnostics"; }; - } ]; }