VS Code Tips: Language-Specific Settings

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


Different languages have different conventions for indentation and formatting. VS Code lets you configure settings per language.

Setting Up Language-Specific Settings

Open VS Code preferences (cmd+,) and add language-specific settings using this format:

"[language-id]": {
    "setting.name": value
}

Example: Different Tab Sizes per Language

Here’s an example configuration with different settings for JavaScript, CSS, HTML, and Go:

{
  "[javascript]": {
    "editor.insertSpaces": true,
    "editor.tabSize": 2
  },
  "[css]": {
    "editor.insertSpaces": true,
    "editor.tabSize": 2
  },
  "[html]": {
    "editor.insertSpaces": true,
    "editor.tabSize": 4
  },
  "[go]": {
    "editor.insertSpaces": false,
    "editor.tabSize": 8
  }
}

In this example:

  • JavaScript and CSS use 2 spaces
  • HTML uses 4 spaces
  • Go uses tabs with a width of 8 (following Go conventions)

Markdown-Specific Settings

When writing Markdown, you might want to disable autocomplete popups:

{
  "[markdown]": {
    "editor.renderWhitespace": "all",
    "editor.acceptSuggestionOnEnter": "off",
    "editor.parameterHints.enabled": false,
    "editor.quickSuggestions": false,
    "editor.snippetSuggestions": "none"
  }
}

This disables all the IntelliSense features that can be distracting when writing prose rather than code.

Other Useful Language Settings

You can override any editor setting per language, including:

  • editor.defaultFormatter - which formatter to use
  • editor.formatOnSave - enable/disable format on save
  • editor.wordWrap - line wrapping behavior
  • editor.rulers - column guides

Lessons in this unit:

0: Introduction
1: Setup and Configuration Tips
2: Terminal Tips
3: Editing Tips
4: Prettier and Auto-Formatting
5: ▶︎ Language-Specific Settings
6: Emmet for Faster HTML/CSS
7: Debugging in VS Code
8: Fix node modules import errors in VS Code
9: Fixing TS issues in VS Code - Astro
10: regex select entire line starting with..