Add LanguageTool grammar/spell checking with a settings dialog

Check the current file against a LanguageTool server (typically a local
instance) from a background thread. Issues are underlined in the editor
(red spelling, blue grammar) and listed in a bottom panel with one-click
fixes that re-align the remaining matches.

A menu bar (File / View / Settings) exposes a LanguageTool settings
dialog with discrete scheme / host / port / token / language fields, an
endpoint preview, and a Test connection button. Config stores the parts
and assembles the base URL. The token is sent as a bearer header.

Uses ureq with a statically-linked rustls backend, so both http and
https endpoints work with no new runtime library dependencies.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
landon
2026-07-27 08:33:00 -05:00
parent 6bd44c2ac9
commit 5ecbf3ffbb
7 changed files with 1017 additions and 2 deletions
+4
View File
@@ -14,6 +14,10 @@ zip = { version = "2", default-features = false, features = ["deflate"] }
dirs = "5"
# Native open/save dialogs via the XDG Desktop Portal (no GTK build dependency).
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "async-std"] }
# Blocking HTTP client for talking to a LanguageTool server. The rustls TLS
# backend links statically (no new runtime .so deps), so both a plain-HTTP local
# server and an HTTPS domain work.
ureq = { version = "2", default-features = false, features = ["tls"] }
[profile.release]
opt-level = 2