From 94dbc6acab9fb504365053711c3baab2349600f4 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 20 Mar 2025 14:24:51 +0100 Subject: [PATCH] plugins/dap (dapHelpers): allow dapHelpers.configurationType to be rawLua --- plugins/by-name/dap/dapHelpers.nix | 44 ++++++++++++++++-------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/plugins/by-name/dap/dapHelpers.nix b/plugins/by-name/dap/dapHelpers.nix index c36f4d30..3a542ea3 100644 --- a/plugins/by-name/dap/dapHelpers.nix +++ b/plugins/by-name/dap/dapHelpers.nix @@ -91,31 +91,33 @@ rec { is used. A use-case for this is starting an adapter asynchronous. ''; - configurationType = types.submodule { - freeformType = types.attrs; + configurationType = types.maybeRaw ( + types.submodule { + freeformType = types.attrs; - options = { - type = lib.mkOption { - description = "Which debug adapter to use."; - type = types.str; - }; + options = { + type = lib.mkOption { + description = "Which debug adapter to use."; + type = types.str; + }; - request = lib.mkOption { - type = types.enum [ - "attach" - "launch" - ]; - description = '' - Indicates whether the debug adapter should launch a debuggee or attach to one that is already running. - ''; - }; + request = lib.mkOption { + type = types.enum [ + "attach" + "launch" + ]; + description = '' + Indicates whether the debug adapter should launch a debuggee or attach to one that is already running. + ''; + }; - name = lib.mkOption { - type = types.str; - description = "A user readable name for the configuration."; + name = lib.mkOption { + type = types.str; + description = "A user readable name for the configuration."; + }; }; - }; - }; + } + ); mkSignOption = default: desc: { text = lib.nixvim.defaultNullOpts.mkStr default desc;