treewide: apply linter suggestions
This commit is contained in:
parent
aca6fcdaff
commit
1d333fc92e
39 changed files with 54 additions and 59 deletions
|
|
@ -186,7 +186,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
(listOf strLua)
|
||||
)
|
||||
);
|
||||
apply = builtins.map mapToRawLua;
|
||||
apply = map mapToRawLua;
|
||||
default = [ ];
|
||||
example = [
|
||||
[
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
(
|
||||
lib.attrValues (
|
||||
# Rename aliases added 2025-06-25 in https://github.com/nix-community/nixvim/pull/3503
|
||||
builtins.removeAttrs cfg.languages [
|
||||
removeAttrs cfg.languages [
|
||||
"warnings"
|
||||
"HTML"
|
||||
"JSON"
|
||||
|
|
@ -208,7 +208,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
(mkToolValue "linters" linter) ++ (mkToolValue "formatters" formatter)
|
||||
)
|
||||
(
|
||||
builtins.removeAttrs cfg.languages [
|
||||
removeAttrs cfg.languages [
|
||||
"all"
|
||||
# Rename aliases added 2025-06-25 in https://github.com/nix-community/nixvim/pull/3503
|
||||
"warnings"
|
||||
|
|
|
|||
|
|
@ -19,9 +19,11 @@ lib.nixvim.plugins.mkVimPlugin {
|
|||
"plugins.blink-cmp.enable"
|
||||
"plugins.nvim-snippets.enable"
|
||||
];
|
||||
enabledConsumers = builtins.filter (path: lib.getAttrFromPath path config) snippetConsumers;
|
||||
enabledConsumers = builtins.filter (
|
||||
consumerPath: lib.getAttrFromPath consumerPath config
|
||||
) snippetConsumers;
|
||||
enabledConsumersPretty = lib.concatMapStringsSep ", " (
|
||||
path: lib.getAttrFromPath path options
|
||||
consumerPath: lib.getAttrFromPath consumerPath options
|
||||
) enabledConsumers;
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
if builtins.isString p then
|
||||
p
|
||||
else
|
||||
builtins.removeAttrs p [
|
||||
removeAttrs p [
|
||||
"path"
|
||||
"requires"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
}:
|
||||
let
|
||||
opts = options.plugins.rainbow-delimiters;
|
||||
inherit (builtins) any isNull;
|
||||
inherit (lib) mapAttrs' nameValuePair isString;
|
||||
inherit (lib.nixvim) mkRaw toLuaObject nestedLiteralLua;
|
||||
in
|
||||
|
|
@ -103,7 +102,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
];
|
||||
|
||||
assertions = lib.nixvim.mkAssertions "plugins.rainbow-delimiters" {
|
||||
assertion = any isNull [
|
||||
assertion = builtins.any isNull [
|
||||
(cfg.settings.whitelist or null)
|
||||
(cfg.settings.blacklist or null)
|
||||
];
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
renamedSettings = lib.foldl' (
|
||||
acc: optPath:
|
||||
let
|
||||
snakeCasePath = builtins.map lib.nixvim.toSnakeCase optPath;
|
||||
snakeCasePath = map lib.nixvim.toSnakeCase optPath;
|
||||
optValue = lib.getAttrFromPath optPath cfg.settings;
|
||||
in
|
||||
lib.recursiveUpdate acc (lib.setAttrByPath snakeCasePath optValue)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
...
|
||||
}@args:
|
||||
lib.nixvim.plugins.mkVimPlugin (
|
||||
builtins.removeAttrs args [
|
||||
removeAttrs args [
|
||||
"pluginName"
|
||||
"sourceName"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ let
|
|||
mkCmpSourcePlugin = import ./_mk-cmp-plugin.nix {
|
||||
inherit lib pkgs;
|
||||
};
|
||||
pluginModules = builtins.map mkCmpSourcePlugin sources;
|
||||
pluginModules = map mkCmpSourcePlugin sources;
|
||||
in
|
||||
{
|
||||
# For extra cmp plugins
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ in
|
|||
acc: scope: renamed':
|
||||
acc ++ lib.mapAttrsToList (old: new: lib.mkRenamedOptionModule [ scope old ] [ scope new ]) renamed'
|
||||
) [ ] renamed
|
||||
++ builtins.map (
|
||||
++ map (
|
||||
name:
|
||||
lib.mkRemovedOptionModule [ "plugins" name "iconsPackage" ] ''
|
||||
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons`, or `plugins.mini-icons` with `plugins.mini-icons.mockDevIcons` instead.
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
actionStr = action.action or action;
|
||||
mode = action.mode or "n";
|
||||
actionProps = lib.optionalAttrs (builtins.isAttrs action) (
|
||||
builtins.removeAttrs action [
|
||||
removeAttrs action [
|
||||
"action"
|
||||
"mode"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
in
|
||||
[ (mkEntryFromDrv plugin) ] ++ processDependencies;
|
||||
|
||||
processedPlugins = builtins.concatLists (builtins.map processPlugin cfg.plugins);
|
||||
processedPlugins = builtins.concatLists (map processPlugin cfg.plugins);
|
||||
lazyPath = pkgs.linkFarm "lazy-plugins" processedPlugins;
|
||||
|
||||
pluginToLua =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue