1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-15 21:41:11 +01:00

plugins/efmls-configs: inline efm language settings (cosmetic)

This commit is contained in:
Gaetan Lepage 2025-12-11 14:17:52 +01:00 committed by Matt Sturgeon
parent 4cf2afde78
commit 575e241fa2

View file

@ -183,32 +183,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
map (
tool: if lib.isString tool then lib.nixvim.mkRaw "require 'efmls-configs.${kind}.${tool}'" else tool
) (lib.toList opt);
setupOptions =
(lib.mapAttrs
(
_:
{
linter ? [ ],
formatter ? [ ],
}:
(mkToolValue "linters" linter) ++ (mkToolValue "formatters" formatter)
)
(
builtins.removeAttrs cfg.languages [
"all"
# Rename aliases added 2025-06-25 in https://github.com/nix-community/nixvim/pull/3503
"warnings"
"HTML"
"JSON"
]
)
)
// {
"=" =
(mkToolValue "linters" cfg.languages.all.linter)
++ (mkToolValue "formatters" cfg.languages.all.formatter);
};
in
{
# TODO: print the location of the offending options
@ -223,7 +197,31 @@ lib.nixvim.plugins.mkNeovimPlugin {
lsp.servers.efm = {
enable = true;
config.settings.languages = setupOptions;
config.settings.languages =
(lib.mapAttrs
(
_:
{
linter ? [ ],
formatter ? [ ],
}:
(mkToolValue "linters" linter) ++ (mkToolValue "formatters" formatter)
)
(
builtins.removeAttrs cfg.languages [
"all"
# Rename aliases added 2025-06-25 in https://github.com/nix-community/nixvim/pull/3503
"warnings"
"HTML"
"JSON"
]
)
)
// {
"=" =
(mkToolValue "linters" cfg.languages.all.linter)
++ (mkToolValue "formatters" cfg.languages.all.formatter);
};
};
extraPackages = map (name: cfg.toolPackages.${name}) nixvimPkgs.right;