nix/user/common/editorconfig/default.nix

33 lines
518 B
Nix
Raw Normal View History

2024-06-18 11:07:11 +03:00
{ lib, ... }: {
text = lib.generators.toINIWithGlobalSection {} {
globalSection.root = true;
2024-04-06 03:03:58 +03:00
2024-06-18 11:07:11 +03:00
sections = {
"*" = {
end_of_line = "lf";
charset = "utf-8";
indent_style = "tab";
indent_size = "2";
insert_final_newline = "true";
trim_trailing_whitespace = "true";
};
2024-04-06 03:03:58 +03:00
2024-06-18 11:07:11 +03:00
Makefile = {
indent_size = 2;
};
2024-04-06 03:03:58 +03:00
2024-06-18 11:07:11 +03:00
"*.{nix,js}" = {
indent_size = 2;
};
2024-04-06 03:03:58 +03:00
2024-06-18 11:07:11 +03:00
"*.{lua,kt,kts,rs,py}" = {
indent_size = 4;
};
2024-04-06 03:03:58 +03:00
2024-06-18 11:07:11 +03:00
"*.{sh,md}" = {
indent_size = 8;
};
};
};
2024-04-06 03:03:58 +03:00
}