mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-28 21:21:03 +01:00
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.
This commit is contained in:
parent
f72c25a5ce
commit
4425fc6d62
1 changed files with 8 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
inherit (lib.nixvim) defaultNullOpts;
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
|
|
@ -50,8 +50,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
# Manually supplied to nvim-dap config module
|
# Manually supplied to nvim-dap config module
|
||||||
callSetup = false;
|
callSetup = false;
|
||||||
extraConfig = cfg: {
|
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 = {
|
plugins.dap = {
|
||||||
enable = true;
|
|
||||||
extensionConfigLua = ''
|
extensionConfigLua = ''
|
||||||
require("nvim-dap-rr").setup(${lib.nixvim.toLuaObject cfg.settings})
|
require("nvim-dap-rr").setup(${lib.nixvim.toLuaObject cfg.settings})
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue