Skip to content

Commit

Permalink
lib/{neovim,vim}-plugin: remove redundant parens
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Dec 18, 2024
1 parent 6019ce7 commit f1addaa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions lib/neovim-plugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
];
}

(lib.optionalAttrs (isColorscheme && (colorscheme != null)) {
(lib.optionalAttrs (isColorscheme && colorscheme != null) {
colorscheme = lib.mkDefault colorscheme;
})

Expand All @@ -159,7 +159,7 @@
))
]
# Lua configuration code generation
++ (lib.optionals hasLuaConfig [
++ lib.optionals hasLuaConfig [

# Add the plugin setup code `require('foo').setup(...)` to the lua configuration
(lib.optionalAttrs callSetup (lib.setAttrByPath loc { luaConfig.content = setupCode; }))
Expand Down Expand Up @@ -197,7 +197,7 @@
];
};
})
])
]
)
);
};
Expand All @@ -209,9 +209,9 @@
in
imports
++ [ module ]
++ (lib.optional deprecateExtraOptions (
++ lib.optional deprecateExtraOptions (
lib.mkRenamedOptionModule (loc ++ [ "extraOptions" ]) settingsPath
))
++ (lib.nixvim.mkSettingsRenamedOptionModules loc settingsPath optionsRenamedToSettings);
)
++ lib.nixvim.mkSettingsRenamedOptionModules loc settingsPath optionsRenamedToSettings;
};
}
10 changes: 5 additions & 5 deletions lib/vim-plugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ rec {
name
];

createSettingsOption = (lib.isString globalPrefix) && (globalPrefix != "");
createSettingsOption = lib.isString globalPrefix && globalPrefix != "";

settingsOption = lib.optionalAttrs createSettingsOption {
settings = mkSettingsOption {
Expand Down Expand Up @@ -133,7 +133,7 @@ rec {
];
globals = lib.nixvim.applyPrefixToAttrs globalPrefix (cfg.settings or { });
}
(lib.optionalAttrs (isColorscheme && (colorscheme != null)) {
(lib.optionalAttrs (isColorscheme && colorscheme != null) {
colorscheme = lib.mkDefault colorscheme;
})
(lib.optionalAttrs (args ? extraConfig) (
Expand All @@ -152,9 +152,9 @@ rec {
in
imports
++ [ module ]
++ (lib.optional (deprecateExtraConfig && createSettingsOption) (
++ lib.optional (deprecateExtraConfig && createSettingsOption) (
lib.mkRenamedOptionModule (loc ++ [ "extraConfig" ]) settingsPath
))
++ (lib.nixvim.mkSettingsRenamedOptionModules loc settingsPath optionsRenamedToSettings);
)
++ lib.nixvim.mkSettingsRenamedOptionModules loc settingsPath optionsRenamedToSettings;
};
}

0 comments on commit f1addaa

Please sign in to comment.