2024-05-05 19:39:35 +02:00
|
|
|
{ pkgs, nonels-sources-options, ... }:
|
2024-03-01 13:24:14 +01:00
|
|
|
{
|
2023-03-14 22:52:53 +01:00
|
|
|
# Empty configuration
|
|
|
|
empty = {
|
2023-10-13 11:43:42 -06:00
|
|
|
plugins.none-ls.enable = true;
|
2023-03-14 22:52:53 +01:00
|
|
|
};
|
|
|
|
|
2023-03-22 07:42:02 +01:00
|
|
|
# Broken:
|
2023-10-13 11:43:42 -06:00
|
|
|
# error: The option `plugins.none-ls.sources.formatting.beautysh' does not exist.
|
2023-03-22 07:42:02 +01:00
|
|
|
#
|
|
|
|
# beautysh = {
|
2023-10-13 11:43:42 -06:00
|
|
|
# plugins.none-ls = {
|
2023-03-22 07:42:02 +01:00
|
|
|
# enable = true;
|
|
|
|
# sources.formatting.beautysh.enable = true;
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
|
2023-11-28 09:47:29 +01:00
|
|
|
with-lsp-format = {
|
|
|
|
plugins = {
|
2023-12-06 15:27:37 +01:00
|
|
|
lsp.enable = true;
|
2023-11-28 09:47:29 +01:00
|
|
|
lsp-format.enable = true;
|
|
|
|
none-ls = {
|
|
|
|
enable = true;
|
|
|
|
enableLspFormat = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-03-14 22:52:53 +01:00
|
|
|
default = {
|
2023-10-13 11:43:42 -06:00
|
|
|
plugins.none-ls = {
|
2024-03-01 13:24:14 +01:00
|
|
|
# sandbox-exec: pattern serialization length 159032 exceeds maximum (65535)
|
|
|
|
enable = !pkgs.stdenv.isDarwin;
|
2023-11-28 09:47:29 +01:00
|
|
|
|
|
|
|
enableLspFormat = false;
|
2023-03-14 22:52:53 +01:00
|
|
|
border = null;
|
2024-05-05 19:39:35 +02:00
|
|
|
cmd = [ "nvim" ];
|
2023-03-14 22:52:53 +01:00
|
|
|
debounce = 250;
|
|
|
|
debug = false;
|
|
|
|
defaultTimeout = 5000;
|
|
|
|
diagnosticConfig = null;
|
|
|
|
diagnosticsFormat = "#{m}";
|
|
|
|
fallbackSeverity = "error";
|
|
|
|
logLevel = "warn";
|
|
|
|
notifyFormat = "[null-ls] %s";
|
|
|
|
onAttach = null;
|
|
|
|
onInit = null;
|
|
|
|
onExit = null;
|
|
|
|
rootDir = null;
|
|
|
|
shouldAttach = null;
|
|
|
|
tempDir = null;
|
|
|
|
updateInInsert = false;
|
2024-05-05 19:39:35 +02:00
|
|
|
sources =
|
|
|
|
let
|
|
|
|
options = nonels-sources-options.options.plugins.none-ls.sources;
|
2024-03-01 13:24:14 +01:00
|
|
|
|
2024-05-05 19:39:35 +02:00
|
|
|
unpackaged =
|
2024-03-01 13:24:14 +01:00
|
|
|
[
|
2024-05-05 19:39:35 +02:00
|
|
|
"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"
|
2024-06-18 10:54:28 +02:00
|
|
|
# As of 2024-06-18, pkgs.rubyfmt is broken on all platforms
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/320722
|
|
|
|
# TODO: re-enable this test when fixed
|
|
|
|
"rubyfmt"
|
2024-05-05 19:39:35 +02:00
|
|
|
"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) [
|
2024-03-27 00:20:39 +01:00
|
|
|
# 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"
|
2024-05-05 19:39:35 +02:00
|
|
|
])
|
|
|
|
++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [
|
2024-05-23 12:11:54 +02:00
|
|
|
# As of 2024-05-22, python311Packages.k5test (one of ansible-lint's dependenvies) is broken on darwin
|
|
|
|
# TODO: re-enable this test when fixed
|
|
|
|
"ansible_lint"
|
2024-03-01 13:24:14 +01:00
|
|
|
"clazy"
|
|
|
|
"gdformat"
|
|
|
|
"gdlint"
|
|
|
|
"haml_lint"
|
|
|
|
"verilator"
|
|
|
|
"verible_verilog_format"
|
2024-05-05 19:39:35 +02:00
|
|
|
])
|
|
|
|
++ (pkgs.lib.optionals pkgs.stdenv.isAarch64 [
|
2024-03-01 13:24:14 +01:00
|
|
|
"semgrep"
|
|
|
|
"smlfmt"
|
2024-03-11 19:01:45 +01:00
|
|
|
# As of 2024-03-11, swift-format is broken on aarch64
|
|
|
|
# TODO: re-enable this test when fixed
|
|
|
|
"swift_format"
|
2024-05-05 19:39:35 +02:00
|
|
|
]);
|
2024-03-01 13:24:14 +01:00
|
|
|
|
2024-05-05 19:39:35 +02:00
|
|
|
sources = pkgs.lib.mapAttrs (
|
|
|
|
_: sources:
|
|
|
|
pkgs.lib.mapAttrs (
|
|
|
|
source: _:
|
|
|
|
{ enable = true; } // pkgs.lib.optionalAttrs (builtins.elem source unpackaged) { package = null; }
|
|
|
|
) sources
|
|
|
|
) options;
|
|
|
|
in
|
2024-03-01 13:24:14 +01:00
|
|
|
sources;
|
2023-03-14 22:52:53 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|