plugin/efmls-configs: init + tests (#542)

This commit is contained in:
traxys 2023-08-27 20:49:23 +02:00 committed by GitHub
parent c4354ea9ec
commit 4cd3707e00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 630 additions and 0 deletions

View file

@ -0,0 +1,37 @@
{
empty = {
plugins.efmls-configs.enable = true;
};
example = {
extraConfigLuaPre = ''
local efm_fs = require('efmls-configs.fs')
local djlint_fmt = {
formatCommand = string.format('%s --reformat ''${INPUT} -', efm_fs.executable('djlint')),
formatStdin = true,
}
'';
plugins.efmls-configs = {
enable = true;
setup = {
# Setup for all languages
all = {
linter = "vale";
};
# Only accepts known tools, or raw strings
html = {
formatter = ["prettier" {__raw = "djlint_fmt";}];
};
# Unknown filetype, accepts anything
htmldjango = {
formatter = [{__raw = "djlint_fmt";}];
linter = "djlint";
};
};
};
};
}