bpruitt-goddard / vscode-mermaid-syntax-highlight

Markdown syntax support for the Mermaid charting language
MIT License
98 stars 38 forks source link

Feature request: Enable highlighting in .mdx files #104

Closed kavsingh closed 7 months ago

kavsingh commented 1 year ago

Hi! I might be missing something here but currently, to have mermaid blocks highlighted in .mdx files, I have to change file associations to read mdx as pure markdown. unfortunately this breaks all other highlighting for MDX syntax.

Would be amazing to have mermaid highlighted in MDX files. On that note would it possible to configure which file / language types this extensions works on? thanks!

kavsingh commented 1 year ago

Oops, answered in https://github.com/bpruitt-goddard/vscode-mermaid-syntax-highlight/issues/21 Closing this one, thanks!

sorry to reopen this one: setting the file association as per https://github.com/bpruitt-goddard/vscode-mermaid-syntax-highlight/issues/21#issuecomment-471815455 will highlight mermaid blocks, but also breaks all other .mdx highlighting in the file

FilipPyrek commented 10 months ago

Any news on this one? I would be great to have this.

My setup is Astro Starlight which uses MDX under the hood and I added a remark plugin remark-mermaidjs.

In VS code I use unifiedjs.vscode-mdx for markdown syntax highlighting.

bpruitt-goddard commented 7 months ago

I think mermaid support would need to be added to that other extension. If this extension were to add support for mdx, it would need to include highlighting for all parts of mdx (markdown in general plus jsx). I'm not aware of a way to "combine" the two extensions to have the mdx support of that extension with the subset of highlighting from this extension.

bpruitt-goddard commented 7 months ago

Closing this issue for now. It can be reopened if a solution or strategy can be presented to make changes here without breaking the other extension(s).