From 1c98cf407944151f052832d8bd2b8ce16fda0b7e Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 13 Jun 2026 00:07:24 +0200 Subject: [PATCH] nvim-dap: add type for configurations --- .../plugins/debugger/nvim-dap/nvim-dap.nix | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/modules/plugins/debugger/nvim-dap/nvim-dap.nix b/modules/plugins/debugger/nvim-dap/nvim-dap.nix index 82ed0b32..65985e9b 100644 --- a/modules/plugins/debugger/nvim-dap/nvim-dap.nix +++ b/modules/plugins/debugger/nvim-dap/nvim-dap.nix @@ -211,6 +211,29 @@ }; }; }; + + configurationType = submodule { + freeformType = attrsOf anything; + options = { + type = mkOption { + type = str; + description = "Which debug adapter to use"; + }; + + request = mkOption { + type = str; + description = '' + Either `attach` or `launch`. Indicates whether the debug adapter + should launch a debugee or attach to one that is already running. + ''; + }; + + name = mkOption { + type = str; + description = "A user-readable name for the configuration"; + }; + }; + }; in { options.vim.debugger.nvim-dap = { enable = mkEnableOption "debugging via nvim-dap"; @@ -248,7 +271,7 @@ in { }; configurations = mkOption { - type = attrsOf (listOf anything); + type = attrsOf (listOf configurationType); default = {}; description = '' Mapping of filetype to list of possible `Configuration`.