Skip to content

feat(cli): add support for TeX and derivative languages#2731

Merged
elijah-potter merged 1 commit intoAutomattic:masterfrom
verri:feature-cli-tex
Feb 16, 2026
Merged

feat(cli): add support for TeX and derivative languages#2731
elijah-potter merged 1 commit intoAutomattic:masterfrom
verri:feature-cli-tex

Conversation

@verri
Copy link
Copy Markdown
Contributor

@verri verri commented Feb 15, 2026

Issues

Related to #79. Follow-up to #2689.

Description

PR #2689 added TeX support to harper-ls but did not update harper-cli. This means running harper-cli lint on a .tex file falls through to the CommentParser/PlainEnglish fallback, causing issues from TeX commands.

This PR adds the harper-tex dependency to harper-cli and a match arm in FileInput::get_parser for .tex, .latex, .sty, .cls, and .dtx extensions.

Demo

After this change, linting a TeX file only reports real grammar issues:

$ cargo run --bin harper-cli -- lint harper-tex/tests/test_sources/simple.tex
simple.tex: 1 lints
Advice:
   ╭─[ simple.tex:1:1 ]
   │
 5 │ This is an test.
   │         ─┬
   │          ╰── [Miscellaneous::AnA] (pri 31): Incorrect indefinite article.
───╯

How Has This Been Tested?

  • cargo build -p harper-cli succeeds
  • cargo test -p harper-cli passes
  • Manual verification: cargo run --bin harper-cli -- lint harper-tex/tests/test_sources/simple.tex correctly uses the TeX parser and only reports legitimate grammar lints

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

I saw no tests for any parser integration in harper-cli, so I am not sure how to proceed.

Copy link
Copy Markdown
Collaborator

@elijah-potter elijah-potter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Thank you!

@elijah-potter elijah-potter added this pull request to the merge queue Feb 16, 2026
Merged via the queue into Automattic:master with commit 3b421cf Feb 16, 2026
11 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 19, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v1.7.0` → `v1.8.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>Automattic/harper (Automattic/harper/harper-ls)</summary>

### [`v1.8.0`](https://github.com/Automattic/harper/releases/tag/v1.8.0)

[Compare Source](Automattic/harper@v1.7.0...v1.8.0)

#### What's Changed

- build(thesaurus): reduce compression level for debug builds by [@&#8203;86xsk](https://github.com/86xsk) in [#&#8203;2694](Automattic/harper#2694)
- feat(chrome-ext): move the review request to 14 days after installation by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2707](Automattic/harper#2707)
- feat(web): show better explanation for how the Chrome extension works by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2712](Automattic/harper#2712)
- fix: add Zig to places I missed on the previous MR by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2709](Automattic/harper#2709)
- fix: better fix for "more foreign" → "foreigner" by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2711](Automattic/harper#2711)
- docs: update link to correct destination by [@&#8203;hulet](https://github.com/hulet) in [#&#8203;2714](Automattic/harper#2714)
- Dictionary curation by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2662](Automattic/harper#2662)
- feat(harper-comments): add Groovy support by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2713](Automattic/harper#2713)
- fix(chrome-ext): tips should refer to "Dismiss" button, not an "Ignore" button by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2719](Automattic/harper#2719)
- feat(ls): add support for `TeX` and derivative languages by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2689](Automattic/harper#2689)
- build(deps): bump bitflags from 2.10.0 to 2.11.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2737](Automattic/harper#2737)
- build(deps): bump sysinfo from 0.38.1 to 0.38.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2735](Automattic/harper#2735)
- build(deps): bump zip from 2.4.2 to 8.0.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2733](Automattic/harper#2733)
- build(deps): bump futures from 0.3.31 to 0.3.32 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2736](Automattic/harper#2736)
- build(deps): bump quickcheck\_macros from 1.1.0 to 1.2.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2734](Automattic/harper#2734)
- feat(core): a good helping of new Weir rules by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2710](Automattic/harper#2710)
- feat(cli): add support for TeX and derivative languages by [@&#8203;verri](https://github.com/verri) in [#&#8203;2731](Automattic/harper#2731)
- feat(obsidian): add keyboard tooltip actions by [@&#8203;stanley-910](https://github.com/stanley-910) in [#&#8203;2732](Automattic/harper#2732)
- feat: add adjective support to not longer→no longer by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2723](Automattic/harper#2723)
- fix(web): hide the erroring "Last Updated" field by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2722](Automattic/harper#2722)
- feat:lead rise to→give rise to by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2729](Automattic/harper#2729)
- fix(core): false positive in the `ToTwoToo` rule by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2721](Automattic/harper#2721)
- fix(core): false positive from `ItsContraction` by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2720](Automattic/harper#2720)
- feat: all be it/al be it→albeit by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2741](Automattic/harper#2741)
- fix: adaptive `message` to address issue [#&#8203;2743](Automattic/harper#2743) by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2748](Automattic/harper#2748)
- fix: `is_possessive_nominal()` had wrong logic by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2740](Automattic/harper#2740)
- feat: ctrl→control by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2747](Automattic/harper#2747)
- fix(core): ignore top-level domains by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2750](Automattic/harper#2750)
- chore: dictionary curation 2026-02-14 by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2728](Automattic/harper#2728)
- feat: did went→did go by [@&#8203;hippietrail](https://github.com/hippietrail) in [#&#8203;2744](Automattic/harper#2744)
- feat: create an AGENTS.md by [@&#8203;elijah-potter](https://github.com/elijah-potter) in [#&#8203;2751](Automattic/harper#2751)

#### New Contributors

- [@&#8203;hulet](https://github.com/hulet) made their first contribution in [#&#8203;2714](Automattic/harper#2714)
- [@&#8203;verri](https://github.com/verri) made their first contribution in [#&#8203;2731](Automattic/harper#2731)
- [@&#8203;stanley-910](https://github.com/stanley-910) made their first contribution in [#&#8203;2732](Automattic/harper#2732)

**Full Changelog**: <Automattic/harper@v1.7.0...v1.8.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNC4yIiwidXBkYXRlZEluVmVyIjoiNDMuMjQuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
hippietrail pushed a commit to hippietrail/harper that referenced this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants