feat: Add editorconfig
If prettier is called via treefmt-nix it does not source .editorconfig files per default, hence the integration is enabled explicitly.
This commit is contained in:
parent
2f18806425
commit
26dbc30f4c
17
.editorconfig
Normal file
17
.editorconfig
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = tabs
|
||||||
|
|
||||||
|
[*.nix]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
indent_size = 2
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
12
treefmt.nix
12
treefmt.nix
|
@ -3,7 +3,10 @@ _: {
|
||||||
projectRootFile = "flake.nix";
|
projectRootFile = "flake.nix";
|
||||||
|
|
||||||
# Files not to format.
|
# Files not to format.
|
||||||
settings.global.excludes = [ "LICENSE" ];
|
settings.global.excludes = [
|
||||||
|
".editorconfig"
|
||||||
|
"LICENSE"
|
||||||
|
];
|
||||||
|
|
||||||
# nix
|
# nix
|
||||||
programs.nixfmt.enable = true; # As of 2024-07-30 this is nixfmt-rfc-style.
|
programs.nixfmt.enable = true; # As of 2024-07-30 this is nixfmt-rfc-style.
|
||||||
|
@ -11,5 +14,10 @@ _: {
|
||||||
programs.deadnix.enable = true;
|
programs.deadnix.enable = true;
|
||||||
|
|
||||||
# markdown
|
# markdown
|
||||||
programs.prettier.enable = true;
|
programs.prettier = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
editorconfig = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue