|
586 | 586 | "The diagnostic check level"; |
587 | 587 | default = "Warning"; |
588 | 588 | }; |
589 | | - config = mkOption { |
| 589 | + configuration = mkOption { |
590 | 590 | type = types.attrs; |
591 | 591 | description = lib.mdDoc |
592 | 592 | "See https://github.com/LuaLS/lua-language-server/wiki/Configuration-File#luarcjson"; |
|
620 | 620 | type = types.submodule { |
621 | 621 | imports = hookModule; |
622 | 622 | options.settings = { |
623 | | - config = |
| 623 | + configuration = |
624 | 624 | mkOption { |
625 | 625 | type = types.attrs; |
626 | 626 | description = lib.mdDoc |
|
1368 | 1368 | default = "auto"; |
1369 | 1369 | }; |
1370 | 1370 |
|
1371 | | - config = |
| 1371 | + configuration = |
1372 | 1372 | mkOption { |
1373 | 1373 | type = types.str; |
1374 | 1374 | description = lib.mdDoc "Multiline-string configuration passed as config file. If set, config set in `typos.settings.configPath` gets ignored."; |
|
1489 | 1489 | type = types.submodule { |
1490 | 1490 | imports = hookModule; |
1491 | 1491 | options.settings = { |
1492 | | - config = |
| 1492 | + configuration = |
1493 | 1493 | mkOption { |
1494 | 1494 | type = types.str; |
1495 | 1495 | description = lib.mdDoc "Multiline-string configuration passed as config file."; |
@@ -2955,15 +2955,15 @@ in |
2955 | 2955 | entry = |
2956 | 2956 | let |
2957 | 2957 | # Concatenate config in config file with section for ignoring words generated from list of words to ignore |
2958 | | - config = "${hooks.typos.settings.config}" + lib.strings.optionalString (hooks.typos.settings.ignored-words != [ ]) "\n\[default.extend-words\]" + lib.strings.concatMapStrings (x: "\n${x} = \"${x}\"") hooks.typos.settings.ignored-words; |
2959 | | - configFile = builtins.toFile "typos-config.toml" config; |
| 2958 | + configuration = "${hooks.typos.settings.configuration}" + lib.strings.optionalString (hooks.typos.settings.ignored-words != [ ]) "\n\[default.extend-words\]" + lib.strings.concatMapStrings (x: "\n${x} = \"${x}\"") hooks.typos.settings.ignored-words; |
| 2959 | + configFile = builtins.toFile "typos-config.toml" configuration; |
2960 | 2960 | cmdArgs = |
2961 | 2961 | mkCmdArgs |
2962 | 2962 | (with hooks.typos.settings; [ |
2963 | 2963 | [ binary "--binary" ] |
2964 | 2964 | [ (color != "auto") "--color ${color}" ] |
2965 | | - [ (config != "") "--config ${configFile}" ] |
2966 | | - [ (configPath != "" && config == "") "--config ${configPath}" ] |
| 2965 | + [ (configuration != "") "--config ${configFile}" ] |
| 2966 | + [ (configPath != "" && configuration == "") "--config ${configPath}" ] |
2967 | 2967 | [ diff "--diff" ] |
2968 | 2968 | [ (exclude != "") "--exclude ${exclude} --force-exclude" ] |
2969 | 2969 | [ (format != "long") "--format ${format}" ] |
@@ -2993,13 +2993,12 @@ in |
2993 | 2993 | package = tools.vale; |
2994 | 2994 | entry = |
2995 | 2995 | let |
2996 | | - # TODO: was .vale.ini, throwed error in Nix |
2997 | | - configFile = builtins.toFile "vale.ini" "${hooks.vale.settings.config}"; |
| 2996 | + configFile = builtins.toFile ".vale.ini" "${hooks.vale.settings.configuration}"; |
2998 | 2997 | cmdArgs = |
2999 | 2998 | mkCmdArgs |
3000 | 2999 | (with hooks.vale.settings; [ |
3001 | 3000 | [ (configPath != "") " --config ${configPath}" ] |
3002 | | - [ (config != "" && configPath == "") " --config ${configFile}" ] |
| 3001 | + [ (configuration != "" && configPath == "") " --config ${configFile}" ] |
3003 | 3002 | ]); |
3004 | 3003 | in |
3005 | 3004 | "${hooks.vale.package}/bin/vale${cmdArgs} ${hooks.vale.settings.flags}"; |
|
0 commit comments