Automattic / Automattic/harper
Regex preprocess before grammar/spell parsing.
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 102
Description
**What problem does this solve?**
Pretty much, I love to write anything in VSCode, this includes stuff for Minecraft, which popularly uses their formatting codes (e.g. `&4` for `dark_red`). The problem is, Harper flags just about any instance that uses these when they hug up against a word or a quote. The exclude setting doesn't solve this entirely.
**Proposed Solution**
The regex preprocess would "filter out" matches (such as the `&f` from `&f"You`) and then let the grammar/spell parsing check on `"You` instead.
```
"harper.preprocessPatterns": [
{
"match": "&.",
"replace": ""
}
]
```
**Examples**
Unsure how to show an example for the above, aside from what was mentioned in the proposed solution.
**Component**
- [ ] Core engine
- [x] Plugin/Extension
- [ ] Other: Settings
**Additional Context**
Any other relevant info.
Contributor guide
Research direction
Start by tracing how the VSCode extension handles settings and how text reaches grammar and spell parsing. Focus on the proposed harper.preprocessPatterns configuration and verify that configured matches are filtered before parsing, while surrounding text such as "You is still checked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100