Skip to content

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.

bash
ext install streetsidesoftware.code-spell-checker
bash
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) or Cmd+. (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)

bash
ext install ban.spellright
bash
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:

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

  1. For Markdown files: Enable automatic spell checking in all .md files
  2. For code comments: Configure the extension to check comment blocks
  3. Quick fixes: Use Ctrl+. to rapidly correct misspelled words
  4. Custom dictionaries: Maintain project-specific dictionaries for technical terms

Troubleshooting

If your spell checker isn't working:

  1. Ensure the extension is enabled for your file type
  2. Check that the language is set correctly in the status bar
  3. Verify no workspace settings are overriding your preferences
  4. 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.