A simple source code spell checker for multiple programming languages.
For the readme on the plugin: README.
npm install -g yarn
yarn install
yarn build
- Launch vscode:
code Spell Checker.code-workspace
- Run the extension from vscode:
Debug Tab
- Choose
Client: Launch Extension (Spell Checker Root)
configuration. F5
* Requires Node >= 14
- Launch vscode:
code packages/client
- Run the extension from vscode:
F5
- Launch vscode for the server:
code packages/_server
- Launch the client as specified above.
- Attach to the server:
F5
orDebug -> Attach Server
Sometimes the ports get stuck. You can see if they are being used with:
netstat -anp tcp | grep 60048
Use the following command to find the process id (PID):
lsof -i tcp:60048
If anything shows up, then the port is still locked.
client
- the actual extension running in VS Code._server
- the extension server that processes spell checker requests_settingsViewer
- a webapp that provides a visual interface to the configuration files._integrationTests
- a test suite that launches the extension in VS Code.
- Edit
SpellCheckerSettings
in server/src/config/cspellConfig.ts to add your configuration field, e.g./** * Configuration description. * @scope resource * @default "option2" * @enumDescriptions [ * "Option 1 Description", * "Option 2 Description"] */ myEnumConfig?: 'option1' | 'option2';
- Edit client/src/settings/configFields.ts by adding a new entry to
ConfigFields
:export const ConfigFields: CSpellUserSettingsFields = { ... myEnumConfig: 'myEnumConfig' }
- Run
It'll update the package.json with the new configurations.
yarn run build-package-schema yarn workspace server run build
- Use the configurations with:
const yourConfigValue = getSettingFromVSConfig(ConfigFields.myEnumConfig, document);
Improvements to existing word lists and new word lists are welcome.
All dictionaries have been migrated to cspell-dicts.
The simplest format is one word per line.
apple
banana
orange
grape
pineapple
For programming languages, a word list might look like this:
ZipArchive::addGlob
ZipArchive::addPattern
ZipArchive::close
ZipArchive::deleteIndex
ZipArchive::deleteName
ZipArchive::extractTo
The word list complier will convert camelCase and snake_case words into a simple word list. This is both for speed and predictability.
ZipArchive::deleteIndex
becomes:
zip
archive
delete
index
Spaces between words in the word list have a special meaning.
New Delhi
New York
Los Angeles
becomes in the compiled dictionary:
new delhi
new
delhi
new york
york
los angeles
los
angeles
Spaces in the compiled dictionary have a special meaning. They tell the suggestion algorithm to suggest: 'newYork', 'new_york', 'new york', etc. for 'newyork'.
The default language is English: "cSpell.language": "en"
CSpell currently has English locals: en-US
and en-GB
.
Example words differences: behaviour (en-GB) vs behavior (en-US)