diff --git a/home-manager/base/nixvim/plugins/dap.nix b/home-manager/base/nixvim/plugins/dap.nix new file mode 100644 index 0000000..8f8c369 --- /dev/null +++ b/home-manager/base/nixvim/plugins/dap.nix @@ -0,0 +1,53 @@ +{ + programs.nixvim = { + plugins.dap = { + enable = true; + luaConfig.content = '' + local dap = require 'dap' + local dapui = require 'dapui' + dap.listeners.after.event_initialized['dapui_config'] = dapui.open + dap.listeners.before.event_terminated['dapui_config'] = dapui.close + dap.listeners.before.event_exited['dapui_config'] = dapui.close + ''; + }; + plugins.dap-ui.enable = true; + plugins.dap-python.enable = true; + keymaps = [ + { + mode = "n"; + key = ""; + action = "DapContinue"; + options.desc = "Debug: Start/Continue"; + options.silent = true; + } + { + mode = "n"; + key = ""; + action = "DapStepInto"; + options.desc = "Debug: Step Into"; + options.silent = true; + } + { + mode = "n"; + key = ""; + action = "DapStepOver"; + options.desc = "Debug: Step Over"; + options.silent = true; + } + { + mode = "n"; + key = ""; + action = "DapStepOut"; + options.desc = "Debug: Step Out"; + options.silent = true; + } + { + mode = "n"; + key = "b"; + action = "DapToggleBreakpoint"; + options.desc = "Debug: Toggle Breakpoint"; + options.silent = true; + } + ]; + }; +} diff --git a/home-manager/base/nixvim/plugins/default.nix b/home-manager/base/nixvim/plugins/default.nix index 722fd5f..5f7ce25 100644 --- a/home-manager/base/nixvim/plugins/default.nix +++ b/home-manager/base/nixvim/plugins/default.nix @@ -2,6 +2,7 @@ { imports = [ ./cmp.nix + ./dap.nix ./lsp.nix ./fmt.nix ./treesitter.nix