Spell Checking in Visual Studio Code
Spell checking is essential for maintaining professional documentation, clear code comments, and error-free markdown files. Visual Studio Code offers several excellent extensions to integrate spell checking directly into your development workflow.
Recommended Extensions
Code Spell Checker (Most Popular)
ext install streetsidesoftware.code-spell-checker
Code Spell Checker
Code Spell Checker is the most widely used solution with over 6.8 million installs. It provides:
- Intelligent spell checking for code comments, strings, and documentation
- Support for camelCase, snake_case, and other programming conventions
- Quick fix suggestions with
Ctrl+.
(Windows/Linux) orCmd+.
(macOS) - Support for multiple programming languages including English (US/UK), French, Spanish, and German
- Ability to add custom words to your personal dictionary
TIP
Use the cSpell.userWords
setting in your VS Code configuration to add project-specific terminology that shouldn't be flagged as errors.
Spell Right (Multilingual Support)
ext install ban.spellright
Spell Right
Spell Right is an excellent alternative, particularly if you need:
- Support for over 30 languages simultaneously
- Advanced LaTeX document support
- Custom dictionary management
- Different checking modes for code vs. documentation
Configuration Example
Customize your spell checker by adding this to your VS Code settings.json
:
{
"cSpell.enabled": true,
"cSpell.checkOnlyEnabledFileTypes": false,
"cSpell.ignoreWords": ["vue", "vitepress", "github"],
"cSpell.userWords": ["customterm", "brandname"],
"cSpell.dictionaries": ["typescript", "node", "html", "css"]
}
WARNING
Be cautious with spell checking in code files. Some extensions may flag variable names and technical terms as errors. Use the ignore list for framework-specific terminology.
Workflow Integration
- For Markdown files: Enable automatic spell checking in all
.md
files - For code comments: Configure the extension to check comment blocks
- Quick fixes: Use
Ctrl+.
to rapidly correct misspelled words - Custom dictionaries: Maintain project-specific dictionaries for technical terms
Troubleshooting
If your spell checker isn't working:
- Ensure the extension is enabled for your file type
- Check that the language is set correctly in the status bar
- Verify no workspace settings are overriding your preferences
- Restart VS Code if words aren't being recognized after adding to dictionary
INFO
Most spell check extensions work offline and don't require internet connectivity, making them suitable for all development environments.
By integrating proper spell checking into VS Code, you can maintain professional documentation and clear code comments without switching between applications, significantly improving your development workflow.