Skip to content

Commit

Permalink
feat: add Mermaid syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jun 25, 2024
1 parent a59a6b5 commit 8cbd52f
Show file tree
Hide file tree
Showing 15 changed files with 6,011 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ This [EclipseⓇ](https://eclipse.org) plug-in adds syntax highlighting support
- LDIF - https://en.wikipedia.org/wiki/LDAP_Data_Interchange_Format
- Mako Templates (`*.mako`) - https://www.makotemplates.org/
- Markdown (`*.md`) - https://daringfireball.net/projects/markdown/
- Mermaid (`*.mmd, *.mermaid`) - https://github.com/mermaid-js/mermaid/
- NginX (`nginx.conf`) - https://www.nginx.com/
- Nushell (`*.nu`) - https://github.com/nushell/nushell
- OCaml (`*.ml`) - https://ocaml.org/
Expand Down Expand Up @@ -127,6 +128,7 @@ To install the plugin into an existing Eclipse installation do:
| LDIF File | file-extensions="ldif" | [master@FlashSystems/LDIF-Syntax](https://github.com/FlashSystems/LDIF-Syntax/tree/f00c21eb1cc5fe5966cf6ef158e854a65449a9fa/)
| Mako Template | file-extensions="mako" | [master@marconi/mako-tmbundle](https://github.com/marconi/mako-tmbundle/tree/45037e4e98f0c215b55b194d303811d43b85407c/Syntaxes)
| Markdown | file-extensions="livemd, markdown, md, mdown, mdwn, mkd, mkdn, mkdown, ronn, scd, workbook" | [main@wooorm/markdown-tm-language](https://github.com/wooorm/markdown-tm-language/tree/371d61df9ddc3850e12aabe61b602d02e259e8a4/)
| mermaid <img src="plugin/syntaxes/mermaid/icon.png" width=16/> | file-extensions="mermaid, mmd" | [master@bpruitt-goddard/vscode-mermaid-syntax-highlight](https://github.com/bpruitt-goddard/vscode-mermaid-syntax-highlight/tree/a45668c7967c52f436a5e268e681c46b9dc9b85a/)
| NGINX Conf <img src="plugin/syntaxes/nginx/icon.png" width=16/> | file-extensions="conf, conf.default, conf.template, fastcgi_params, mime.types, nginx, nginx.conf, scgi_params, uwsgi_params" | [main@ahmadalli/vscode-nginx-conf](https://github.com/ahmadalli/vscode-nginx-conf/tree/10414d948cc5e52fbf2a8207629427d4ae3bc8c4/)
| nushell <img src="plugin/syntaxes/nushell/nushell.png" width=16/> | file-extensions="nu" | [main@nushell/vscode-nushell-lang](https://github.com/nushell/vscode-nushell-lang/tree/c854eb1403a4a4ef9788a57fe042bec0a397c02d/)
| OCaml <img src="plugin/syntaxes/ocaml/icon.png" width=16/> | file-extensions="eliom, ml, ocamlinit" | [master@ocamllabs/vscode-ocaml-platform](https://github.com/ocamllabs/vscode-ocaml-platform/tree/93612358aa5a55f3ac67cdc0884840cccdcedeaf/)
Expand Down
32 changes: 32 additions & 0 deletions plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,38 @@
<snippet name="Markdown Example" path="syntaxes/markdown/markdown.example.md" scopeName="text.md" />
</extension>

<!-- ======================================== -->
<!-- mermaid/mermaid: mermaid -->
<!-- ======================================== -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type id="extra-syntax-highlighting.mermaid" name="mermaid" base-type="extra-syntax-highlighting.basetype" priority="normal"
file-extensions="mermaid,mmd" />
</extension>
<extension point="org.eclipse.tm4e.registry.grammars">
<grammar scopeName="source.mermaid" path="syntaxes/mermaid/mermaid.tmLanguage.json" />
<scopeNameContentTypeBinding scopeName="source.mermaid" contentTypeId="extra-syntax-highlighting.mermaid" />
</extension>

<extension point="org.eclipse.tm4e.languageconfiguration.languageConfigurations">
<languageConfiguration contentTypeId="extra-syntax-highlighting.mermaid" path="syntaxes/mermaid/mermaid.language-configuration.json" />
</extension>

<extension point="org.eclipse.ui.genericeditor.icons">
<icon contentType="extra-syntax-highlighting.mermaid" icon="syntaxes/mermaid/icon.png"/>
</extension>

<extension point="org.eclipse.tm4e.ui.snippets">
<snippet name="mermaid Example" path="syntaxes/mermaid/mermaid.example.mermaid" scopeName="source.mermaid" />
</extension>

<!-- ======================================== -->
<!-- mermaid: Inline Grammars -->
<!-- ======================================== -->
<extension point="org.eclipse.tm4e.registry.grammars">
<grammar scopeName="markdown.mermaid.codeblock" path="syntaxes/mermaid/markdown.mermaid.codeblock.tmLanguage.json" />
<grammar scopeName="mdx.mermaid.codeblock" path="syntaxes/mermaid/mdx.mermaid.codeblock.tmLanguage.json" />
</extension>

<!-- ======================================== -->
<!-- nginx/nginx: NGINX Conf -->
<!-- ======================================== -->
Expand Down
21 changes: 21 additions & 0 deletions plugin/syntaxes/mermaid/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Brian Pruitt-Goddard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file added plugin/syntaxes/mermaid/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugin/syntaxes/mermaid/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8cbd52f

Please sign in to comment.