treewide: Reformat with nixfmt

This commit is contained in:
traxys 2024-05-05 19:39:35 +02:00
parent c6281260dc
commit 62f32bfc71
459 changed files with 28139 additions and 26377 deletions

View file

@ -1,8 +1,5 @@
{ pkgs, nonels-sources-options, ... }:
{
pkgs,
nonels-sources-options,
...
}: {
# Empty configuration
empty = {
plugins.none-ls.enable = true;
@ -36,7 +33,7 @@
enableLspFormat = false;
border = null;
cmd = ["nvim"];
cmd = [ "nvim" ];
debounce = 250;
debug = false;
defaultTimeout = 5000;
@ -52,99 +49,85 @@
shouldAttach = null;
tempDir = null;
updateInInsert = false;
sources = let
options = nonels-sources-options.options.plugins.none-ls.sources;
sources =
let
options = nonels-sources-options.options.plugins.none-ls.sources;
unpackaged =
[
"blade_formatter"
"bsfmt"
"bslint"
"cljstyle"
"cueimports"
# As of 2024-03-22, pkgs.d2 is broken
# TODO: re-enable this test when fixed
"d2_fmt"
"erb_lint"
"findent"
"forge_fmt"
"gccdiag"
"gersemi"
"markuplint"
"mlint"
"nginx_beautifier"
"npm_groovy_lint"
"ocdc"
"packer"
"perlimports"
"pint"
"pretty_php"
"purs_tidy"
"pyink"
"reek"
"regal"
"remark"
"rescript"
"saltlint"
"solhint"
"spectral"
"sqlfmt"
"sql_formatter"
"styler"
"stylint"
"swiftformat"
"swiftlint"
"textidote"
"textlint"
"twigcs"
"vacuum"
"yamlfix"
]
++ (
pkgs.lib.optionals
(pkgs.stdenv.isDarwin && pkgs.stdenv.isx86_64)
unpackaged =
[
"blade_formatter"
"bsfmt"
"bslint"
"cljstyle"
"cueimports"
# As of 2024-03-22, pkgs.d2 is broken
# TODO: re-enable this test when fixed
"d2_fmt"
"erb_lint"
"findent"
"forge_fmt"
"gccdiag"
"gersemi"
"markuplint"
"mlint"
"nginx_beautifier"
"npm_groovy_lint"
"ocdc"
"packer"
"perlimports"
"pint"
"pretty_php"
"purs_tidy"
"pyink"
"reek"
"regal"
"remark"
"rescript"
"saltlint"
"solhint"
"spectral"
"sqlfmt"
"sql_formatter"
"styler"
"stylint"
"swiftformat"
"swiftlint"
"textidote"
"textlint"
"twigcs"
"vacuum"
"yamlfix"
]
++ (pkgs.lib.optionals (pkgs.stdenv.isDarwin && pkgs.stdenv.isx86_64) [
# As of 2024-03-27, pkgs.graalvm-ce (a dependency of pkgs.clj-kondo) is broken on x86_64-darwin
# TODO: re-enable this test when fixed
"clj_kondo"
"rubyfmt"
]
)
++ (
pkgs.lib.optionals
pkgs.stdenv.isDarwin
[
])
++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [
"clazy"
"gdformat"
"gdlint"
"haml_lint"
"verilator"
"verible_verilog_format"
]
)
++ (
pkgs.lib.optionals
pkgs.stdenv.isAarch64
[
])
++ (pkgs.lib.optionals pkgs.stdenv.isAarch64 [
"semgrep"
"smlfmt"
# As of 2024-03-11, swift-format is broken on aarch64
# TODO: re-enable this test when fixed
"swift_format"
]
);
]);
sources = pkgs.lib.mapAttrs (_: sources:
pkgs.lib.mapAttrs (source: _:
{
enable = true;
}
// pkgs.lib.optionalAttrs (builtins.elem source unpackaged) {
package = null;
})
sources)
options;
in
sources = pkgs.lib.mapAttrs (
_: sources:
pkgs.lib.mapAttrs (
source: _:
{ enable = true; } // pkgs.lib.optionalAttrs (builtins.elem source unpackaged) { package = null; }
) sources
) options;
in
sources;
};
};