1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-24 18:00:59 +01:00

plugins/efmls-configs: rename setup to languages

This commit is contained in:
Gaetan Lepage 2025-12-11 14:14:42 +01:00 committed by Matt Sturgeon
parent 1e0916836a
commit 4cf2afde78
2 changed files with 26 additions and 10 deletions

View file

@ -6,12 +6,12 @@
all =
{ options, ... }:
let
inherit (options.plugins.efmls-configs) setup;
inherit (options.plugins.efmls-configs) languages;
# toolOptions is an attrsets of the form:
# { <lang> = { linter = tools; formatter = tools; }; }
# Where tools is the option type representing the valid tools for this language
toolOptions = builtins.removeAttrs (setup.type.getSubOptions setup.loc) [
toolOptions = builtins.removeAttrs (languages.type.getSubOptions languages.loc) [
"_freeformOptions"
"_module"
@ -81,7 +81,7 @@
# linter = [<all valid linters for lang>];
# formatter = [<all valid formatters for lang>];
# };}
setup = builtins.mapAttrs (_: builtins.mapAttrs (_: toolsFromOptions)) toolOptions;
languages = builtins.mapAttrs (_: builtins.mapAttrs (_: toolsFromOptions)) toolOptions;
};
};
@ -97,7 +97,7 @@
plugins.efmls-configs = {
enable = true;
setup = {
languages = {
# Setup for all languages
all = {
linter = "vale";