mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-01 08:34:41 +02:00
treewide: format with new treefmt
This commit is contained in:
parent
c61851aff7
commit
8529f1c86b
34 changed files with 688 additions and 702 deletions
|
@ -215,39 +215,38 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
|
||||
extraConfig = cfg: {
|
||||
autoCmd = lib.optionals (cfg.autoCmd != null) [ cfg.autoCmd ];
|
||||
plugins.lint.luaConfig.content =
|
||||
''
|
||||
local __lint = require('lint')
|
||||
''
|
||||
+ (lib.optionalString (cfg.lintersByFt != null) ''
|
||||
__lint.linters_by_ft = ${toLuaObject cfg.lintersByFt}
|
||||
'')
|
||||
+ (lib.optionalString (cfg.customLinters != null) (
|
||||
lib.concatLines (
|
||||
plugins.lint.luaConfig.content = ''
|
||||
local __lint = require('lint')
|
||||
''
|
||||
+ (lib.optionalString (cfg.lintersByFt != null) ''
|
||||
__lint.linters_by_ft = ${toLuaObject cfg.lintersByFt}
|
||||
'')
|
||||
+ (lib.optionalString (cfg.customLinters != null) (
|
||||
lib.concatLines (
|
||||
lib.mapAttrsToList (
|
||||
customLinter: linterConfig:
|
||||
let
|
||||
linterConfig' =
|
||||
if builtins.isString linterConfig then lib.nixvim.mkRaw linterConfig else linterConfig;
|
||||
in
|
||||
"__lint.linters.${customLinter} = ${toLuaObject linterConfig'}"
|
||||
) cfg.customLinters
|
||||
)
|
||||
))
|
||||
+ (lib.optionalString (cfg.linters != null) (
|
||||
lib.concatLines (
|
||||
lib.flatten (
|
||||
lib.mapAttrsToList (
|
||||
customLinter: linterConfig:
|
||||
let
|
||||
linterConfig' =
|
||||
if builtins.isString linterConfig then lib.nixvim.mkRaw linterConfig else linterConfig;
|
||||
in
|
||||
"__lint.linters.${customLinter} = ${toLuaObject linterConfig'}"
|
||||
) cfg.customLinters
|
||||
)
|
||||
))
|
||||
+ (lib.optionalString (cfg.linters != null) (
|
||||
lib.concatLines (
|
||||
lib.flatten (
|
||||
linter: linterConfig:
|
||||
lib.mapAttrsToList (
|
||||
linter: linterConfig:
|
||||
lib.mapAttrsToList (
|
||||
propName: propValue:
|
||||
lib.optionalString (
|
||||
propValue != null
|
||||
) "__lint.linters.${linter}.${propName} = ${toLuaObject propValue}"
|
||||
) linterConfig
|
||||
) cfg.linters
|
||||
)
|
||||
propName: propValue:
|
||||
lib.optionalString (
|
||||
propValue != null
|
||||
) "__lint.linters.${linter}.${propName} = ${toLuaObject propValue}"
|
||||
) linterConfig
|
||||
) cfg.linters
|
||||
)
|
||||
));
|
||||
)
|
||||
));
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue