Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see preview of .mdx file as markdown in VSCode

Is there a way I can force VSCode to preview *.mdx files as markdown just like it does for *.md files? For reference see how Github shows preview of this mdx file

I know there's an extension MDX Preview but that's not working for next.js project. see open issue.

I tried this vscode setting but doesn't work:

"files.associations": {
    "*.mdx": "md"
  },
like image 804
GorvGoyl Avatar asked Sep 13 '25 10:09

GorvGoyl


1 Answers

In files.associations you mention the languageId to use for a particular file extension

"files.associations": {
    "*.mdx": "markdown"
},
like image 69
rioV8 Avatar answered Sep 16 '25 07:09

rioV8