visual-studio-code

Where can I find the list of supported languages for markdown preview code fence syntax highlight in vscode?


I used markdown preview feature in vscode a lot.

I figured out the code fence syntax highlighting language support in markdown preview panel is different from the list of vscode supported language. I tried to google this, but can not find any useful information.

For instance, shell in markdown preview code fence is for terminal syntax instead of shellscript/bash and it does not exist in vscode language support.


Solution

  • From what I can tell VS Code uses the highlight.js library.
    Reference: No syntax highlight for the D programming language in Markdown's fenced code blocks

    There is a list of supported languages on their GitHub page:

    highlight.js SUPPORTED_LANGUAGES.md