docs: plan lsp formatting and unicode diagnostics

This commit is contained in:
Dandaedre 2026-09-29 23:58:26 +02:00
parent d43850b5a3
commit 62d99e3015
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
1 changed files with 28 additions and 4 deletions

View File

@ -515,14 +515,38 @@ badge drift. Formatting, Clippy, rustdoc, both feature matrices, pre-publication
package assembly, and Tarpaulin passed; coverage remains 92.34%
(1,411/1,528 lines).
## Milestone 21 — LSP formatter parity and Unicode review diagnostics
- [ ] Implement and advertise `textDocument/formatting` in the LSP using the
same resolved configuration and core replacement planner as `john-slop-fmt`.
Return deterministic UTF-16 edits against the current editor snapshot, cover
Unicode/CRLF/no-op/custom-config/reload cases, and replace the misleading
quick-fix-only equivalence assertion with an actual protocol request.
- [ ] Add non-fixing review diagnostics for Unicode characters that resemble
ASCII under a pinned Unicode UTS #39 profile, plus Gitea-compatible invisible
and bidirectional controls. Keep these findings distinct from the smaller
automatic replacement allowlist, configurable as normal heuristic rules, and
document provenance, multilingual false positives, and profile boundaries.
- [ ] Refresh examples, editor/architecture/configuration/limitations guides,
evaluation fixtures and sign-off, coverage metadata, package version
`0.1.21`, changelog, and generated badges.
Acceptance: a real LSP formatting request produces exactly the same text as
`john-slop-fmt` for the same source and layered configuration; formatter output
contains no broader confusable rewrite; representative ASCII-lookalikes,
invisible characters, and bidi controls receive exact-span CLI and LSP
diagnostics without quick fixes; ordinary ASCII and reviewed multilingual near
misses remain covered; formatting, Clippy, rustdoc, both feature matrices,
package assembly, and the coverage floor pass before the immutable `v0.1.21`
tag is created.
## Deferred by design
- Statistical or model-based authorship classification.
- Automatic prose or source-code rewriting beyond configured ASCII replacements.
- Locale-aware confusable, invisible, and bidirectional Unicode detection. The
researched catalogs and adoption constraints are recorded in
`docs/unicode-confusables.md`; detection must remain separate from automatic
replacement.
- Locale-aware confusable policy beyond the pinned review profile. Broader
locale selection still requires product validation; detection remains
separate from automatic replacement.
- In-place modification of archive members or office documents.
- Network-backed analysis or telemetry.
- Editor-specific extensions; the LSP is the integration boundary.