bpruitt-goddard / vscode-mermaid-syntax-highlight

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

feat: add mermaid language configuration #124

Closed CatBraaain closed 7 months ago

CatBraaain commented 10 months ago

Add language configuration and support features bellow

Code snippets https://code.visualstudio.com/api/language-extensions/language-configuration-guide

Test test

I'm very new to pull request, I welcome any feedback.

CatBraaain commented 9 months ago

and support embed mermaid in markdown test gif

bpruitt-goddard commented 7 months ago

I like the comment toggling and the embedded mermaid in markdown support, but I worry that the bracket matching/autoclosing will give issues. Consider the relationship syntax in ER diagrams. This change will make it less clear that they are valid. For example I'm seeing these brace closing errors in the ER test file:

image

A similar problem happens when trying to create new relationships - the bracket is attempted to autoclose ,which is not relevant for the relationship. Could we remove the brace functionality from here?

CatBraaain commented 7 months ago

Thanks for reviewing. After receiving your feedback, I found some similar problems in curl bracket and square bracket. 2024-04-11 18 41 38 2024-04-11 18 41 51

I removed some features what I'm not sure it affects any problems.

Current feature

bpruitt-goddard commented 7 months ago

The PR looks good, there are just some prettier issues in a file. Can you fix these before merge?

Checking formatting... [warn] syntaxes/mermaid.tmLanguage-markdown.yaml [warn] Code style issues found in the above file. Run Prettier to fix. Problem running prettier with --check */.{js,yaml,md}

CatBraaain commented 7 months ago

Thanks for reviewing. I ran npx prettier --write syntaxes/mermaid.tmLanguage-markdown.yaml and commit it again.

CatBraaain commented 7 months ago

Thanks to you, I'm glad I succeeded my first pull request.

bpruitt-goddard commented 6 months ago

Awesome job on your first PR! Thanks for picking this project to contribute to!