From 4425fc6d620fe406cf1911b806069849709c3ddd Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 25 Nov 2025 23:16:52 -0600 Subject: [PATCH] plugins/dap-rr: require dap to be explicitly enabled Instead of automatically enabling `plugins.dap`, require users to explicitly enable it. This prevents silent re-enabling of dap when a user has explicitly disabled it. --- plugins/by-name/dap-rr/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/by-name/dap-rr/default.nix b/plugins/by-name/dap-rr/default.nix index ae7fe485..2ee6ef7e 100644 --- a/plugins/by-name/dap-rr/default.nix +++ b/plugins/by-name/dap-rr/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ config, lib, ... }: let inherit (lib) types; inherit (lib.nixvim) defaultNullOpts; @@ -50,8 +50,14 @@ lib.nixvim.plugins.mkNeovimPlugin { # Manually supplied to nvim-dap config module callSetup = false; extraConfig = cfg: { + assertions = lib.nixvim.mkAssertions "plugins.dap-rr" { + assertion = config.plugins.dap.enable; + message = '' + You have to enable `plugins.dap` to use `plugins.dap-rr`. + ''; + }; + plugins.dap = { - enable = true; extensionConfigLua = '' require("nvim-dap-rr").setup(${lib.nixvim.toLuaObject cfg.settings}) '';