nixvim: rename transparency options to camelCase (#497)

This commit is contained in:
Daniel Thwaites 2024-08-06 12:42:19 +01:00 committed by GitHub
parent 3499dff34d
commit 94aa0fc0fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,12 +7,21 @@
options.stylix.targets.nixvim = {
enable =
config.lib.stylix.mkEnableTarget "nixvim" true;
transparent_bg = {
transparentBackground = {
main = lib.mkEnableOption "background transparency for the main NeoVim window";
sign_column = lib.mkEnableOption "background transparency for the NeoVim sign column";
signColumn = lib.mkEnableOption "background transparency for the NeoVim sign column";
};
};
imports = [
(lib.mkRenamedOptionModule
[ "stylix" "targets" "nixvim" "transparent_bg" "main" ]
[ "stylix" "targets" "nixvim" "transparentBackground" "main" ])
(lib.mkRenamedOptionModule
[ "stylix" "targets" "nixvim" "transparent_bg" "sign_column" ]
[ "stylix" "targets" "nixvim" "transparentBackground" "signColumn" ])
];
config = lib.mkIf (config.stylix.enable && config.stylix.targets.nixvim.enable && (config.programs ? nixvim)) (
lib.optionalAttrs (builtins.hasAttr "nixvim" options.programs) {
programs.nixvim = {
@ -33,9 +42,9 @@
ctermbg = "none";
};
in {
Normal = lib.mkIf cfg.transparent_bg.main transparent;
NonText = lib.mkIf cfg.transparent_bg.main transparent;
SignColumn = lib.mkIf cfg.transparent_bg.sign_column transparent;
Normal = lib.mkIf cfg.transparentBackground.main transparent;
NonText = lib.mkIf cfg.transparentBackground.main transparent;
SignColumn = lib.mkIf cfg.transparentBackground.signColumn transparent;
};
};
}