silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.01k stars 138 forks source link

Add Batch (.bat) Syntax Highlighting #885

Open jbonadiman opened 3 weeks ago

jbonadiman commented 3 weeks ago

Please could batch (.bat)/cmd syntax highlighting be added to codeblocks?

Reproduce Issue

  1. Insert code block and after the first ``` enter either bat, batch or cmd
  2. No syntax highlighting provided

Thanks in advance!

MrMugame commented 2 weeks ago

I couldn't find any good codemirror mode for batch files, so this is probably something that has to wait until there is a proper plugin api for language modes.

zefhemel commented 2 weeks ago

Indeed, I would have hoped it's available from here: https://github.com/codemirror/legacy-modes/tree/main/mode but I don't see it. So indeed somebody would have to create one first. Unless it's compatible with powershell, but I don't think so?