From 08c8af8c0100a409ae027281bb5e06d325a34183 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 25 Nov 2025 23:16:59 -0600 Subject: [PATCH] plugins/dap-ui: require dap to be enabled Add assertion requiring `plugins.dap` to be enabled when using `plugins.dap-ui`. --- plugins/by-name/dap-ui/default.nix | 10 ++++++++++ tests/test-sources/plugins/by-name/dap-ui/default.nix | 2 ++ 2 files changed, 12 insertions(+) diff --git a/plugins/by-name/dap-ui/default.nix b/plugins/by-name/dap-ui/default.nix index f89c2a3f..3d88a22c 100644 --- a/plugins/by-name/dap-ui/default.nix +++ b/plugins/by-name/dap-ui/default.nix @@ -1,4 +1,5 @@ { + config, lib, ... }: @@ -193,6 +194,15 @@ lib.nixvim.plugins.mkNeovimPlugin { ''; }; + extraConfig = { + assertions = lib.nixvim.mkAssertions "plugins.dap-ui" { + assertion = config.plugins.dap.enable; + message = '' + You have to enable `plugins.dap` to use `plugins.dap-ui`. + ''; + }; + }; + # NOTE: Renames added in https://github.com/nix-community/nixvim/pull/2897 (2025-01-26) deprecateExtraOptions = true; imports = [ ./deprecations.nix ]; diff --git a/tests/test-sources/plugins/by-name/dap-ui/default.nix b/tests/test-sources/plugins/by-name/dap-ui/default.nix index 727708bd..30b73f5b 100644 --- a/tests/test-sources/plugins/by-name/dap-ui/default.nix +++ b/tests/test-sources/plugins/by-name/dap-ui/default.nix @@ -1,9 +1,11 @@ { empty = { + plugins.dap.enable = true; plugins.dap-ui.enable = true; }; default = { + plugins.dap.enable = true; plugins.dap-ui = { enable = true;