1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-15 05:21:06 +01:00

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>
This commit is contained in:
Loïc Reynier 2022-09-06 15:50:36 +02:00 committed by GitHub
parent 583a99f016
commit de94878b6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 109 additions and 0 deletions

View file

@ -0,0 +1 @@
{ editorconfig-simple-config = ./editorconfig-simple-config.nix; }

View file

@ -0,0 +1,15 @@
# Generated by Home Manager
root=true
[*]
charset=utf-8
end_of_line=lf
indent_style=space
insert_final_newline=true
max_line_width=78
trim_trailing_whitespace=true
[*.md]
indent_size=unset
trim_trailing_whitespace=false

View file

@ -0,0 +1,28 @@
{ ... }:
{
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
}
'';
}