-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add language: Mermaid Diagram Support #5578
Comments
Please note, Linguist can only add support for syntax highlighting of the files (I'm not sure how useful that would be) assuming a grammar can be found. Rendering to show the images would need to be implemented elsewhere. |
I am currently working on a text mate grammar, so I’ll create a PR after I am done with that. |
I think https://github.com/bpruitt-goddard/vscode-mermaid-syntax-highlight should do the trick for syntax highlighting |
I've never seen this syntax before. Is repository:
mermaid:
patterns: !!import/deep
- diagrams/ Doesn't look like a valid TextMate-compatible grammar to me. It might rely on a build-step or something… |
🤦 I completely missed that. Nope, that's not a YAML thing... it's a TypeScript module thing and yup, there's a build-step 😞 Ignore me 😁 |
Want me to write one? I'm already halfway through taking apart Mermaid's own Monaco-based highlighter to see how it works. I've reduced it to a list of keywords and patterns, so smashing something together shouldn't be too difficult. All I ask in return is that GitHub support Pikchr so we can use pic(1) on GitHub. 😁 EDIT: Wait, Mermaid is, like, 10 different syntaxes hiding under a trench-coat pretending to be a single language. I can write a grammar for it, but I probably won't be done in time for the next Linguist release. 😅 |
Go for it if you want the challenge and no rush. I thought it would be a quick addition when I found the grammar.
Ask in the Product Feedback section of https://github.com/orgs/community/discussions/ and you never know, your wish may come true one day 😁 |
Track progress here: https://github.com/Alhadis/language-mermaid I'll submit a PR once I've finished splattering mermaids. |
Language name
MermaidJS
URL of example repository
https://github.com/lotusnprod/lotus-processor/blob/f46c20768fa80e8fe6c438424323734f547f6163/docs/flowchart.mmd
URL of syntax highlighting grammar
WIP
Most popular extensions
.mmd
Detected language
N/A
Popularity
https://github.com/search?p=1&q=extension%3Ammd&type=Code (6K Results)
The text was updated successfully, but these errors were encountered: