mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-05 16:41:04 +01:00
tex-fmt is a LaTeX source code formatter written in Rust, and uses a user configuration file in the .toml format.
31 lines
727 B
Nix
31 lines
727 B
Nix
{ config, pkgs, ... }: {
|
|
config = {
|
|
programs.tex-fmt = {
|
|
enable = true;
|
|
settings = {
|
|
wrap = true;
|
|
tabsize = 2;
|
|
tabchar = "space";
|
|
lists = [ ];
|
|
};
|
|
};
|
|
|
|
nmt.script = let
|
|
expectedConfDir = if pkgs.stdenv.isDarwin then
|
|
"Library/Application Support"
|
|
else
|
|
".config";
|
|
expectedConfigPath = "home-files/${expectedConfDir}/tex-fmt/tex-fmt.toml";
|
|
in ''
|
|
assertFileExists "${expectedConfigPath}"
|
|
assertFileContent "${expectedConfigPath}" ${
|
|
pkgs.writeText "tex-fmt.config-custom.expected" ''
|
|
lists = []
|
|
tabchar = "space"
|
|
tabsize = 2
|
|
wrap = true
|
|
''
|
|
}
|
|
'';
|
|
};
|
|
}
|