Skip to content

Commit

Permalink
Add optional settings to latexindent hook
Browse files Browse the repository at this point in the history
  • Loading branch information
t4ccer committed Oct 25, 2023
1 parent 8cc349b commit 8364aa0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ in
default = "";
};
};
latexindent =
{
flags =
mkOption {
type = types.str;
description = lib.mdDoc "Flags passed to latexindent. See available flags [here](https://latexindentpl.readthedocs.io/en/latest/sec-how-to-use.html#from-the-command-line)";
default = "--local --silent --overwriteIfDifferent";
};
};
ormolu =
{
defaultExtensions =
Expand Down Expand Up @@ -1143,7 +1152,7 @@ in
name = "latexindent";
description = "Perl script to add indentation to LaTeX files.";
types = [ "file" "tex" ];
entry = "${tools.latexindent}/bin/latexindent --local --silent --overwriteIfDifferent";
entry = "${tools.latexindent}/bin/latexindent ${settings.latexindent.flags}";
};
luacheck =
{
Expand Down

0 comments on commit 8364aa0

Please sign in to comment.