Automattic / Automattic/harper

Quick Fix Menu does not display "Add to dictionary"

Open
#2,639 4 comments 0 reactions 0 assignees View on GitHub
bug visual-studio-code-plugin
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
102

Description

**Describe the bug**
I am unable to add words to the dictionary via the "Quick Fix" menu, despite having a custom dictionary file created and configured in `.vscode/settings.json`. The "Add to Dictionary" option simply does not appear in the context menu for flagged typos.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a blank file named `.harper-dictionary.txt` in the workspace root.
2. Configure `.vscode/settings.json` with the following settings:
```json
{
"harper.workspaceDictPath": "./.harper-dictionary.txt",
"harper.codeActions.forceStable": true
}
```
3. Run the command `Harper: Restart Language Server`.
4. Type a deliberate typo in a file (e.g., `myuniquewordtest`).
5. Hover over the squiggly line and press `Ctrl` + `.` (Quick Fix).
6. **See error:** The menu appears, but the option "Add 'myuniquewordtest' to dictionary" is missing.

**Expected behavior**
When a valid workspace dictionary path is configured and a typo is flagged, the Quick Fix menu should include an option to "Add [word] to dictionary," which should append the word to the referenced text file.

**Screenshots**
*(If applicable, add screenshots to help explain your problem)*

**Platform**
Visual Studio Code

**Additional context**
* **Settings Used:**
```json
{
"editor.defaultFormatter": "myriad-dreamin.tinymist",
"harper.workspaceDictPath": "./.harper-dictionary.txt"
}
```
* I have verified that the `.harper-dictionary.txt` file exists in the root.
* I have tried restarting the Language Server and reloading the VS Code window multiple times.
* I attempted to use `harper.workspaceDictPath` initially, but also tried `harper-ls.workspaceDictPath` with no success.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the missing action with .vscode/settings.json, .harper-dictionary.txt, and the Harper: Restart Language Server command, then trace the Quick Fix code action entry point. Done means the menu offers “Add [word] to dictionary” for a flagged typo and appends the word to the configured dictionary file.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.