如何在 VSCode 中以 Markdown 形式查看 .mdx 文件的预览

2024-03-27

有什么办法我可以forceVSCode 预览*.mdx文件作为 markdown 就像它一样*.md文件?作为参考,请参阅 Github 如何显示预览this https://github.com/GorvGoyl/Personal-Site-Gourav.io/blob/master/pages/blog/setup-vscode-to-run-debug-c-cpp-code/index.mdxmdx 文件

我知道有一个扩展MDX 预览 https://marketplace.visualstudio.com/items?itemName=xyc.vscode-mdx-preview但这不适合next.js项目。看开放问题 https://github.com/xyc/vscode-mdx-preview/issues/41.

我尝试了这个 vscode 设置但不起作用:

"files.associations": {
    "*.mdx": "md"
  },

In files.associations您提到用于特定文件扩展名的 languageId

"files.associations": {
    "*.mdx": "markdown"
},
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 VSCode 中以 Markdown 形式查看 .mdx 文件的预览 的相关文章

随机推荐