[MEDIUM] Spellcheck masking removed, may cause false positives #37

Open xenolandscapes.com
Open opened by xenolandscapes.com

In src/cursed/spell/driver.lua, the _check function no longer uses mask_mod to exclude non-checkable text (strings, comments, etc.) from spellcheck. The entire buffer line is sent to enchant, which will flag code identifiers, numbers, and punctuation as misspellings. The old driver relied on mask_mod.build_ranges and mask_line to restrict checking to prose regions (e.g., comments and strings). The new driver sends raw line text without masking, effectively disabling the mode's spellcheck_captures configuration. This degrades the spellcheck experience in code modes.

  • File: src/cursed/spell/driver.lua, lines 66-85
  • Commit: b5d15868 (buffer: adjust properties spans inline on every mutation) and subsequent refactoring commits.

Suggestion: Restore or re-implement per-mode spellcheck masking, possibly by iterating over the buffer's properties spans that carry atts.text (replacement-text spans) or by consulting the parse tree to identify comment/string regions.

Commit range: b5d15868..335f21a5

Related commits: b5d15868, 2bae4fdb, 00f27d2e, 3f60340f, bae3843c

Sign up or Sign in to add to the discussion.