perform some statix linting and fixes

This commit is contained in:
Tanish2002 2023-05-22 15:45:47 +05:30 committed by Gaétan Lepage
parent eee375e97e
commit efdcbe225f
57 changed files with 196 additions and 221 deletions

View file

@ -63,7 +63,7 @@ in {
Specifying a timeout with a value less than zero will prevent commands from timing out.
'';
diagnosticConfig = helpers.defaultNullOpts.mkNullable (types.attrs) "null" ''
diagnosticConfig = helpers.defaultNullOpts.mkNullable types.attrs "null" ''
Specifies diagnostic display options for null-ls sources, as described in
`:help vim.diagnostic.config()`.
(null-ls uses separate namespaces for each source, so server-wide configuration will not work

View file

@ -59,7 +59,7 @@
plugins.null-ls.sourcesItems = let
sourceItem = "${sourceType}.${name}";
withArgs =
if (isNull cfg.withArgs)
if (cfg.withArgs == null)
then sourceItem
else "${sourceItem}.with ${cfg.withArgs}";
finalString = ''require("null-ls").builtins.${withArgs}'';

View file

@ -84,13 +84,12 @@
serverDataFormatted =
lib.mapAttrsToList
(
sourceType: sourceSet:
lib.mapAttrsToList (name: attrs: attrs // {inherit sourceType name;}) sourceSet
sourceType: lib.mapAttrsToList (name: attrs: attrs // {inherit sourceType name;})
)
serverData;
dataFlattened = lib.flatten serverDataFormatted;
in {
imports = lib.lists.map (helpers.mkServer) dataFlattened;
imports = lib.lists.map helpers.mkServer dataFlattened;
config = let
cfg = config.plugins.null-ls;