nix/user/common/editorconfig/default.nix

33 lines
547 B
Nix

{ pkgs, ... }: {
file = (pkgs.formats.iniWithGlobalSection {}).generate "EditorconfigConfig" {
globalSection.root = true;
sections = {
"*" = {
end_of_line = "lf";
charset = "utf-8";
indent_style = "tab";
indent_size = "2";
insert_final_newline = "true";
trim_trailing_whitespace = "true";
};
Makefile = {
indent_size = 2;
};
"*.{nix,js}" = {
indent_size = 2;
};
"*.{lua,kt,kts,rs,py}" = {
indent_size = 4;
};
"*.{sh,md}" = {
indent_size = 8;
};
};
};
}