1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-19 00:09:48 +01:00
home-manager/tests/modules/misc/editorconfig/editorconfig-simple-config.nix
Loïc Reynier de94878b6b
editorconfig: add module (#3204)
Add a module to generate `~/.editorconfig` configuration file.

Co-authored-by: Robert Helgesson <robert@rycee.net>
Co-authored-by: Sumner Evans <me@sumnerevans.com>
2022-09-06 07:50:36 -06:00

28 lines
568 B
Nix

{ ... }:
{
editorconfig = {
enable = true;
settings = {
"*" = {
charset = "utf-8";
end_of_line = "lf";
trim_trailing_whitespace = true;
insert_final_newline = true;
max_line_width = 78;
indent_style = "space";
};
"*.md" = {
indent_size = "unset";
trim_trailing_whitespace = false;
};
};
};
nmt.script = ''
assertFileExists home-files/.editorconfig
assertFileContent home-files/.editorconfig ${
./editorconfig-simple-config-expected
}
'';
}