1
0
Fork 0
mirror of synced 2026-12-06 17:22:26 +00:00
No description
Find a file
Parker Wahle e544068087
chore(pre-commit): run this repository's own ltex-plus hook, from v0.1.0
Its README and AGENTS.md pass; Dependabot moves the rev with each release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mv4cZ3LFVAJ9aG5SntwnAr
2026-12-03 18:14:56 -05:00
.github feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
src/regulad_pre_commit_hooks feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
.gitattributes feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
.gitignore feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
.pre-commit-config.yaml chore(pre-commit): run this repository's own ltex-plus hook, from v0.1.0 2026-12-03 18:14:56 -05:00
.pre-commit-hooks.yaml feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
AGENTS.md feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
git-conventional-commits.yaml feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
LICENSE.md feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
pyproject.toml feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00
README.md feat(ltex-plus): check prose in markup with LTeX+ 2026-12-03 18:07:50 -05:00

pre-commit-hooks

The pre-commit hooks that regulad's projects use.

ltex-plus

Checks the prose in a project's documentation and content with LTeX+, LanguageTool for markup: Markdown, READMEs included, MDX, LaTeX, reStructuredText, AsciiDoc, Org and Typst files, by extension. A license file is left alone, vendored copies included, since its text stays exactly as published. Any finding fails the hook, and ltex-cli-plus prints each one with its rule.

repos:
  - repo: https://github.com/regulad/pre-commit-hooks
    rev: <full commit SHA>  # frozen: <release>
    hooks:
      - id: ltex-plus

It runs the ltex-cli-plus on PATH, with the shared settings in ~/.config/ltex-plus/: settings.json and initialization-options.json. regulad/dotfiles installs all three, and its docs/language-servers.md says what the settings hold. Where they aren't installed, as in CI, skip the hook: SKIP=ltex-plus.

ltex-cli-plus needs ltex-plus/lsp-cli-plus#72, which sends the repository's root as the workspace folder and the initialization options, and ltex-plus/ltex-ls-plus#234, which resolves the dictionary's path against it. Prices take two more: without ltex-plus/ltex-ls-plus#238, a long paragraph with a $ in it stops the check, and without #237, MDX reads $ as the start of TeX math. Until LTeX+ releases them, regulad/dotfiles installs a build that has them.

A project's own words

A word that LanguageTool doesn't know, and that the project uses as a word rather than as code, goes in .vscode/ltex.dictionary.en-US.txt, one per line, in UTF-8. VS Code's LTeX+ reads that file by itself, and its "Add to dictionary" writes there; the shared settings point every other client, this hook included, at the same file. Commit it, and keep the rest of .vscode/ out of the repository unless the project needs it there:

.vscode/*
!.vscode/ltex.dictionary.en-US.txt

To exclude more than licenses, such as vendored code, give the hook its own exclude. It replaces the hook's, so keep the license pattern from .pre-commit-hooks.yaml in it.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.md.