mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-16 05:51:10 +01:00
plugins/efmls-configs: inline efm language settings (cosmetic)
This commit is contained in:
parent
4cf2afde78
commit
575e241fa2
1 changed files with 25 additions and 27 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue