mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 18:24:35 +02:00
plugin/efmls-configs: init + tests (#542)
This commit is contained in:
parent
c4354ea9ec
commit
4cd3707e00
7 changed files with 630 additions and 0 deletions
37
tests/test-sources/plugins/lsp/efmls-configs.nix
Normal file
37
tests/test-sources/plugins/lsp/efmls-configs.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue