Install Code Spell Checker extension
- install Code Spell checker extension
Add Custom dictionary folder
- create a file on your system; name it anything; I set it as myDictionary.txt ; you can add your words in a new line ( one word each line)
Add settings in vs code settings
open vs code settings and edit the settings.json file
How it Workspace
when you see error hint on a word, right click on it and you will see the option
select Add Word in dictionary ( your dictionary name )
Workspace specific dictionary
To add a dictionary at the project level should be defined in a cspell.json file so it can be used with the cspell command line tool. This file can be either at the project root or in the .vscode directory.
you can add .vscode/cSpell.json file
I have added one word ‘kapda’ there in project-words.txt and save it
now when we write a word which is not added in dictionary and specific for our project then it suggest word to add in your custom dictionary of workspace dictionary;
see the attaches screenshot to see the file placement and context menu suggestion
extra tips
if you want to remove a full line under a unknown word and want to just a hint then update below settings