Zed extension for the Harper Grammar Checker LS.
| Platform | X86_64 | ARM64 |
|---|---|---|
| Linux | ✅ | ✅ |
| macOS | ✅ | ✅ |
| Windows | ✅ | ❌ |
- Open the Extension Gallery
- Search for
harperin the Gallery - Click "Install"!
When Harper encounters a potentially misspelled word in the Zed editor, the word will be highlighted.
To view view more details, you can hover the highlighted word to see the warning and related Harper rule.
To fix the issue, click or move the cursor to the highlighted word and then open the Zed code actions (default keyboard shortcut: CTRL + .) to see a list of suggested fixes. You can also click the lightning icon for the relevant line to see the same code actions.
For simple grammar and spelling mistakes, this is usually enough to quickly find and fix issues.
You can add new words to your Harper dictionaries by using the Zed code action described above. There are three kinds of dictionaries available:
- User dictionary - Your global dictionary for all projects.
- Workspace dictionary - Local project-specific dictionary. Useful to keep in version control to have a shared dictionary for your team.
- File-Local dictionary - Custom words only for the current file.
You can configure where these dictionaries are stored. See below for more info.
This extension lets you customise the Harper LS configuration by for example adding the following to your Zed/settings.json:
Note that both of the two nested layers of harper-ls are required for the configuration to work.
Harper dictionary files should be simple line-separated text files. Learn more about how they work, and where you can find them in the Harper documentation.
You can configure where to store your user dictionary, workspace dictionary and file dictionaries by editing Zed/settings.json:
"lsp: {
"harper-ls": {
"settings": {
"harper-ls": {
// Set the file path where the user dictionary is located
"userDictPath": "%relative_path%",
// Set the file path where the workspace dictionary is located
"workspaceDictPath": ".harper-dictionary.txt",
// Set the directory where the file-local dictionaries are located
"fileDictPath": "%relative_path%"
},
},
},
}For additional info consult Harper LS configuration page.
- elijah-potter for creating Harper
- WeetHet for their typst LS extension which was used as inspiration for this repository :)

