VS Code Language Settings Cheat Sheet

Sidebar

Programming · VS Code Language Settings Cheat Sheet

Settings that belong to one language or tool: per-language overrides, Python (extension and Pylance), JavaScript/TypeScript, Markdown, Prettier and ESLint. Exact ID, what it does, and its default. Sheet 6 in the VS Code series; see the tip below about which versions were checked.

Per-Language Overrides

"[python]": { … }In settings.json: any setting placed inside applies to that language only
"[javascript]": { "editor.tabSize": 2 }Example: two-space indents for JavaScript, whatever the global setting
"[markdown]": { "editor.wordWrap": "on" }Example: wrap lines in Markdown only
editor.defaultFormatterSet inside a language block to choose its formatter, e.g. "esbenp.prettier-vscode"
@lang:pythonSettings-editor filter that lists only settings you can override per language
files.associationsTreat file patterns as a language, e.g. { "*.cmd": "bat" }
Ctrl+K MChange Language Mode for the current file (also: click the language in the status bar)

Python Extension: Basics

python.defaultInterpreterPathInterpreter used when none is selected (default python)
Python: Select InterpreterCommand Palette command: choose the interpreter or virtual environment for this workspace
python.terminal.activateEnvironmentActivate the selected environment in new terminals (default true)
python.terminal.activateEnvInCurrentTerminalAlso activate it in the terminal that is already open (default false)
python.envFilePath to a .env file loaded for runs (default ${workspaceFolder}/.env)
python.createEnvironment.triggerprompt (default) or off: offer to create a venv for new projects
python.venvPathFolder that contains your virtual environments (default empty)
python.languageServerDefault (default), Jedi, Pylance, None

Python Testing

python.testing.pytestEnabledUse pytest for the Testing view (default false)
python.testing.unittestEnabledUse unittest instead (default false)
python.testing.pytestArgsExtra pytest arguments, e.g. ["tests"] (default [])
python.testing.unittestArgsunittest arguments (default -v -s . -p *test*.py)
python.testing.autoTestDiscoverOnSaveEnabledRediscover tests when you save (default true)
python.testing.cwdWorking folder for test runs (default none)

Pylance: Checking & Imports

python.analysis.typeCheckingModeoff (default), basic, standard, strict: how many type problems are reported
python.analysis.diagnosticModeopenFilesOnly (default) or workspace: which files are analysed
python.analysis.autoImportCompletionsOffer symbols from unimported modules, with auto-import (default false)
python.analysis.extraPathsExtra folders searched for modules (default [])
python.analysis.autoSearchPathsSearch src folders automatically (default true)
python.analysis.importFormatabsolute (default) or relative for generated imports
python.analysis.indexingIndex installed packages for faster completions (default true)
python.analysis.exclude / .includeFolders left out of / limited to analysis (default [])
python.analysis.diagnosticSeverityOverridesChange a rule's level, e.g. { "reportMissingImports": "warning" }

Pylance: Hints & Extras

python.analysis.inlayHints.variableTypesShow inferred variable types inline (default false)
python.analysis.inlayHints.functionReturnTypesShow inferred return types inline (default false)
python.analysis.inlayHints.callArgumentNamesoff (default), partial, all: show parameter names at call sites
python.analysis.inlayHints.pytestParametersShow types for pytest fixtures (default false)
python.analysis.completeFunctionParensAdd () when you accept a function completion (default false)
python.analysis.autoFormatStringsTyping { in a string adds the f prefix (default false)
python.analysis.stubPathFolder for your own type stubs (default typings)
python.analysis.useLibraryCodeForTypesInfer types from library source when there are no stubs (default true)

JavaScript & TypeScript (built in)

javascript.* / typescript.*Most settings come in twins; the examples below show one of each pair
typescript.preferences.quoteStyleQuotes in generated code: auto (default), single, double
typescript.preferences.importModuleSpecifiershortest (default), relative, non-relative, project-relative
typescript.updateImportsOnFileMove.enabledUpdate imports when you move a file: prompt (default), always, never
typescript.suggest.autoImportsAuto-import suggestions (default true)
typescript.format.semicolonsignore (default), insert, remove
typescript.inlayHints.parameterNames.enablednone (default), literals, all
typescript.inlayHints.variableTypes.enabledShow variable types inline (default false)
js/ts.implicitProjectConfig.checkJsType-check plain .js files (default false)
typescript.tsserver.maxTsServerMemoryMemory limit for the TypeScript server, in MB (default 3072)
typescript.tsdkPath to a TypeScript lib folder to use instead of the built-in one (default none)

Markdown (built in)

Ctrl+Shift+V / Ctrl+K VOpen the Markdown preview / open it beside the editor
markdown.preview.breaksSingle line breaks become line breaks in the preview (default false)
markdown.preview.fontSize / .lineHeightPreview text size and spacing (defaults 14 and 1.6)
markdown.preview.scrollPreviewWithEditorPreview follows the editor's scrolling (default true)
markdown.preview.scrollEditorWithPreviewEditor follows the preview's scrolling (default true)
markdown.preview.openMarkdownLinksinPreview (default) or inEditor
markdown.validate.enabledCheck links and headings for errors (default false)
markdown.updateLinksOnFileMove.enablednever (default), prompt, always: fix links when files move
markdown.editor.drop.enabled / .filePaste.enabledsmart (default), always, never: insert a link when you drop or paste a file
markdown.stylesYour own CSS files for the preview (default none)

Prettier Extension (esbenp.prettier-vscode)

prettier.requireConfigFormat only when a Prettier config file exists (default false)
prettier.configPathExplicit path to a config file (default none)
prettier.ignorePathFile listing paths not to format (default .prettierignore)
prettier.useEditorConfigRead .editorconfig (default true)
prettier.printWidthLine length before wrapping (default 80)
prettier.tabWidth / .useTabsIndent width (default 2) and tabs instead of spaces (default false)
prettier.singleQuote / .semiSingle quotes (default false) / semicolons (default true)
prettier.trailingCommaall (default), es5, none

ESLint Extension (dbaeumer.vscode-eslint)

eslint.enableTurn the extension on or off (default true)
eslint.runLint onType (default) or onSave
eslint.validateLanguage IDs to lint; empty (default) lets the extension detect them
eslint.format.enableUse ESLint as a formatter (default false)
eslint.codeActionsOnSave.modeall (default) or problems: what a save-time fix may change
eslint.useFlatConfigForce flat-config mode on or off; empty (default) lets ESLint decide
eslint.workingDirectoriesFolders ESLint treats as project roots, useful in monorepos
eslint.lintTask.enableAdd a task that lints the whole workspace (default false)

A Reasonable Starter Set (my suggestions, not defaults)

"python.analysis.typeCheckingMode": "basic"A useful middle ground; off is the default
"python.analysis.autoImportCompletions": trueAuto-import suggestions in Python
"python.terminal.activateEnvInCurrentTerminal": trueActivates the venv in an already-open terminal
"[javascript]": { "editor.tabSize": 2 }The usual two-space convention for web code
"[markdown]": { "editor.wordWrap": "on" }Wrap prose files, not code
"markdown.validate.enabled": trueFlags broken Markdown links as you write
"typescript.updateImportsOnFileMove.enabled": "always"No prompt when you move a file
Extension settings change with the extension's version
JavaScript/TypeScript and Markdown settings are built into VS Code, but the Python, Pylance, Prettier and ESLint settings come from extensions and can change when those update. This sheet was checked against Python 2026.6.0, Pylance 2026.4.1, Prettier 12.4.0 and ESLint 3.0.34. Search the exact ID in the Settings editor to confirm it still exists in yours.
Prettier ignoring your VS Code settings? Look for a config file
When a .prettierrc (or other Prettier config) or an .editorconfig exists in the project, it takes priority over the prettier.* settings in VS Code. Remove or rename the config file if you want VS Code's settings to be used.