-
Hi, I write docs using Mkdocs and the Material theme, as well as some extensions that allow for things like customized admonitions and tabs. Note: this post pertains to the editor view, not the preview. I don't use the preview inside VS Code because it doesn't properly parse or style Mkdocs. Is there a ready-made solution that exists for format highlighting in the editor while I'm working in VS Code, regardless of how the text is nested or its indentation level? The render is fine, but when I'm putting something into a tab or admonition while editing:
or
it breaks the highlighting in the editor. All my lists, all my links, all my other formatting is just grey. I use in-editor syntax highlighting to catch things like placeholders or formatting issues, so it's inconvenient not to have it for pages that are built around tabs for parallel users flows. I don't know if this is down to indentation detection, but I turned it off and turned tab size to 2. No change. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I am afraid that might just be the way it is until someone writes a Markdown plugin that supports the Python Markdown Extensions. The builtin editor will only do "standard" Markdown syntax. I have one plugin installed that adds support for footnotes. There is a related discussion microsoft/vscode#86546 over on the vscode repo. It would be awesome to get support for this in VSCode (and other editors/IDEs) but that needs someone to step forward and code it. |
Beta Was this translation helpful? Give feedback.
-
Ah, too bad. Thanks for the link. I'll look into it and see if there's some feedback on the VS Code side that I can contribute. I was looking into https://github.com/MinusGix/admonition-markdown-syntax and rewriting what was there on my own fork to reflect the differences between the extension's understanding of admonition syntax and Mkdocs. But beyond the regex to identify the "begin" it's beyond me. |
Beta Was this translation helpful? Give feedback.
I am afraid that might just be the way it is until someone writes a Markdown plugin that supports the Python Markdown Extensions. The builtin editor will only do "standard" Markdown syntax. I have one plugin installed that adds support for footnotes. There is a related discussion microsoft/vscode#86546 over on the vscode repo. It would be awesome to get support for this in VSCode (and other editors/IDEs) but that needs someone to step forward and code it.