1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-02 15:11:05 +01:00
nixvim/plugins/by-name/dap-go/default.nix
Austin Horstman f72c25a5ce 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.
2025-11-26 09:12:28 +00:00

29 lines
808 B
Nix

{
config,
lib,
...
}:
lib.nixvim.plugins.mkNeovimPlugin {
name = "dap-go";
package = "nvim-dap-go";
description = "An extension for nvim-dap providing configurations for launching go debugger.";
maintainers = [ lib.maintainers.khaneliman ];
# Manually supplied to nvim-dap config module
callSetup = false;
extraConfig = cfg: {
assertions = lib.nixvim.mkAssertions "plugins.dap-go" {
assertion = config.plugins.dap.enable;
message = ''
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)
imports = [ ./deprecations.nix ];
}