diff --git a/modules/debugger/nvim-dap/config.nix b/modules/debugger/nvim-dap/config.nix index cf18897..b3d08f7 100644 --- a/modules/debugger/nvim-dap/config.nix +++ b/modules/debugger/nvim-dap/config.nix @@ -11,9 +11,13 @@ in { (mkIf cfg.enable { vim.startPlugins = ["nvim-dap"]; - vim.luaConfigRC.nvim-dap = - nvim.dag.entryAnywhere '' - ''; + vim.luaConfigRC = + { + nvim-dap = nvim.dag.entryAnywhere '' + local dap = require("dap") + ''; + } + // mapAttrs (_: v: (nvim.dag.entryAfter ["nvim-dap"] v)) cfg.sources; }) (mkIf (cfg.enable && cfg.ui.enable) { vim.startPlugins = ["nvim-dap-ui"]; diff --git a/modules/debugger/nvim-dap/nvim-dap.nix b/modules/debugger/nvim-dap/nvim-dap.nix index 1a9f2fe..159f88e 100644 --- a/modules/debugger/nvim-dap/nvim-dap.nix +++ b/modules/debugger/nvim-dap/nvim-dap.nix @@ -11,5 +11,11 @@ with lib; { description = "Automatically Opens and Closes DAP-UI upon starting/closing a debugging session"; }; }; + + sources = mkOption { + default = {}; + description = "List of debuggers to install"; + type = with types; attrsOf string; + }; }; }