vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
813 stars 129 forks source link

Add cs and csharp for code block (in addition to c#) #823

Open DeuxAlpha opened 4 years ago

DeuxAlpha commented 4 years ago

Hello. Love the plugin!

In Azure DevOps Services, if you create a wiki, it does not recognize c# as a valid code block, so there is no syntax highlighting. However, cs and csharp is supported. In turn, the navigator does not support cs and csharp, so I have no code highlighting on that end.

If you could add support for one or the other, it would be much appreciated!

vsch commented 4 years ago

@DeuxAlpha, the syntax highlighting in preview is provided by HighlightJS or Prism JavaScripts and configured in Languages & Frameworks | Markdown | Stylesheet settings.

To customize these you would need to add custom JS to HTML Generation settings and to know how each of these libraries can be extended.

In the text editor the syntax highlighting is provided by the IDE not the plugin. The plugin only provides the language of the injected fragment by taking the language string for the code block and matching it to IDE recognized languages by converting the IDE language to lowercase.

The only way to add syntax highlighting to the text editor for languages is to add a plugin which supports syntax highlighting for the language so the IDE recognizes it and can provide syntax highlighting.