mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-28 21:21:03 +01:00
plugins/dap-go: 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
5f74bfcc11
commit
f72c25a5ce
2 changed files with 11 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -12,12 +13,16 @@ 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: {
|
||||||
plugins.dap = {
|
assertions = lib.nixvim.mkAssertions "plugins.dap-go" {
|
||||||
enable = true;
|
assertion = config.plugins.dap.enable;
|
||||||
extensionConfigLua = ''
|
message = ''
|
||||||
require("dap-go").setup(${lib.nixvim.toLuaObject cfg.settings})
|
You have to enable `plugins.dap` to use `plugins.dap-go`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugins.dap.extensionConfigLua = ''
|
||||||
|
require("dap-go").setup(${lib.nixvim.toLuaObject cfg.settings})
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
# NOTE: Renames added in https://github.com/nix-community/nixvim/pull/2897 (2025-01-26)
|
# NOTE: Renames added in https://github.com/nix-community/nixvim/pull/2897 (2025-01-26)
|
||||||
imports = [ ./deprecations.nix ];
|
imports = [ ./deprecations.nix ];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
|
plugins.dap.enable = true;
|
||||||
plugins.dap-go.enable = true;
|
plugins.dap-go.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
|
plugins.dap.enable = true;
|
||||||
plugins.dap-go = {
|
plugins.dap-go = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue