Skip to content

Instantly share code, notes, and snippets.

@alexcwatt
Last active November 28, 2021 23:08
Show Gist options
  • Save alexcwatt/a0bfb2799da14601a4652a1d910e7679 to your computer and use it in GitHub Desktop.
Save alexcwatt/a0bfb2799da14601a4652a1d910e7679 to your computer and use it in GitHub Desktop.
VS Code: Language Specific Settings

This gist shows how to configure VS Code settings, including tab/space settings, by language / file extension.

Note: You can also configure "editor.insertSpaces": true/false on a per-language basis. I use "editor.insertSpaces": true at a global level, but I don't want to start another spaces vs. tabs war!

{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.tabSize": 4
},
"[ruby]": {
"editor.defaultFormatter": "Shopify.rubocop-lsp",
"editor.tabSize": 2,
"files.trimTrailingWhitespace": true
},
"[yaml]": {
"editor.tabSize": 2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment