CSpell Language Server support for Zed editor.
This is the engine behind the famous Code Spell Checker from VSCode.
Currently, you need to clone this repository and install this extension using the "Install Dev Extension" button in your editor. Select the whole directory.
This extension relies on node
and npm
, which should be installed on your machine beforehand.
Once installed, add execution rights to the script (version might differ):
chmod 500 ~/.local/share/zed/extensions/work/cspell/cspell-vscode-4.0.13/extension/cspell-lsp
The CSpell extension can be configured through a .cspell.json
configuration file, which reference can be found here.
Additionally, you can configure it in your Zed's settings with the following:
{
"lsp": {
"cspell": {
"initialization_options": {
// Your configuration from the reference here
}
}
}
}
Since default Add to dictionary
code action does not work with Zed, a workaround is to define a custom dictionary in your .cspell.json
configuration file:
{
"dictionaries": ["custom"],
"dictionaryDefinitions": [
{ "name": "custom", "path": "./.cspell_dict.txt" }
]
}
Then, use Add to custom dictionary
instead.