Skip to content

Commit

Permalink
Merge pull request #440 from michaelvanstraten/master
Browse files Browse the repository at this point in the history
Fix and document lacheck hook
  • Loading branch information
domenkozar committed Apr 30, 2024
2 parents 6fb82e4 + 091eaa3 commit 2849da0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ clang-format supports.
### LaTeX

- [chktex](https://www.nongnu.org/chktex/)
- [lacheck](https://ctan.org/pkg/lacheck)
- [latexindent](https://github.com/cmhughes/latexindent.pl)

### Lua
Expand Down
9 changes: 8 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2583,12 +2583,19 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
entry = "${hooks.latexindent.package}/bin/latexindent ${hooks.latexindent.settings.flags}";
};
lacheck =
let
script = pkgs.writeShellScript "precommit-mdsh" ''
for file in $(echo "$@"); do
"${hooks.lacheck.package}/bin/lacheck" "$file"
done
'';
in
{
name = "lacheck";
description = "A consistency checker for LaTeX documents.";
types = [ "file" "tex" ];
package = tools.lacheck;
entry = "${hooks.lacheck.package}/bin/lacheck";
entry = "${script}";
};
lua-ls =
let
Expand Down

0 comments on commit 2849da0

Please sign in to comment.