Introduction #
As a non-native English speaker, it can be frustrating to write code in English and make misspellings in the documentation or elsewhere in the code.
The following extension will highlight any misspellings it can find. That’s very handful daily day as a software developer.
You can find the extension here: Code Spell Checker.
How it works #
Simply install the extension, and you are good to go!
Here is an example of it in action:
It becomes simple to spot misspellings like this and correct them before committing.
Add other languages #
Installation #
The beautiful part of this extension is that it is possible to add dictionaries for other languages.
Go to the extension view in VSCode and search for code spell checker
. From
there, you can add the dictionaries you want.
You can find it directly on the online marketplace here.
Configuration #
Installing dictionaries isn’t sufficient; you will need to enable them either in user space or the workspace.
To do so, go to the VSCode settings and search for spell language
. From
here, you can define the dictionaries you want.
Example: en, fr.
Remember, setting them in the user space will enable them on all the projects associated with your user, while in the workspace, you can share them with your team.
What about specifically misspelled words? #
Sometimes in development, some words are abbreviated, which results in an error when
using the extension. It is possible to add those words to the internal dictionary. To
accomplish this, you can right-click on the misspelled word, go to
Spelling
, and here you will have two options:
-
Workspace settings: add the word to the workspace settings in
.vscode/settings.json
. Doing so allows you to share with your coworkers the words that are ignored. - User settings: add the word to your personal VSCode settings. This means you do this one time, and all your projects under your account will contain the correction.
Simple and useful!