How to map files to programming languages in Visual Studio Code
Enable syntax highlighting of any file. Map its extension to a programming language in settings.json.
Example
Markdown and MDX files
settings.json
{
"files.associations": { "*.mdx": "markdown" },
}
Languages
Microsoft provides a list of all available languages.