Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add typstyle #454

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ clang-format supports.
### Typst

- [typstfmt](https://github.com/astrale-sharp/typstfmt)
- [typstyle](https://github.com/Enter-tainer/typstyle)

### Fortran

Expand Down
11 changes: 11 additions & 0 deletions modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3414,6 +3414,17 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
entry = "${hooks.typstfmt.package}/bin/typstfmt";
files = "\\.typ$";
};
typstyle = {
name = "typstyle";
description = "Beautiful and reliable typst code formatter";
package = tools.typstyle;
entry =
lib.throwIf
(hooks.typstyle.package == null)
"The version of nixpkgs used by pre-commit-hooks.nix must contain typstyle"
"${hooks.typstyle.package}/bin/typstyle";
files = "\\.typ$";
};
vale = {
name = "vale";
description = "A markup-aware linter for prose built with speed and extensibility in mind.";
Expand Down
2 changes: 2 additions & 0 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
, treefmt
, typos
, typstfmt
, typstyle ? null ## Add in nixpkgs added on commit 800ca60
, zprint
, yamlfmt
, yamllint
Expand Down Expand Up @@ -146,6 +147,7 @@ in
treefmt
typos
typstfmt
typstyle
vale
yamlfmt
yamllint
Expand Down
Loading