Automattic / Automattic/harper
[False Positive] `# <Word> To-Do` is flagged as not title case & code action gives wrong suggestion
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 106
Description
**What got flagged?**
Line:
```markdown
## Daily To-Do
```
**Diagnostic on that line:**
Try to use title case in headings.
The code action also gives wrong suggestion.
Just adding `# Todo` as heading doesn't the trigger the warning. Only when an additional word is added to the heading, it flags the heading not been title case.
**Additional Information**
nvim-lspconfig:
```lua
harper_ls = {
enabled = true,
filetypes = { 'markdown'},
settings = {
['harper-ls'] = {
userDictPath = '~/.config/nvim/spell/en.utf-8.add',
-- linters = {
-- -- ToDoHyphen = false,
-- -- SentenceCapitalization = true,
-- -- SpellCheck = true,
-- },
isolateEnglish = true,
markdown = {
IgnoreLinkTitle = true,
},
},
},
},
```
Contributor guide
Research direction
Reproduce the diagnostic and code action on the Markdown heading `## Daily To-Do`, using the nvim-lspconfig setup shown in the issue. Start by tracing the title-case check and its suggestion for headings with `To-Do`; done means this heading is not falsely flagged and the code action no longer suggests the wrong replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, neovim, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100