vscode-just
vscode-just copied to clipboard
Syntax highlight based on inline script type
Just allows you to have inline scripts for recipes:
recipe:
#!/usr/bin/env python
import sys
print("Hello from stderr", file=sys.stderr)
It would be nice if vscode-just could correctly syntax highlight these scripts, using the shebang to determine what syntax highlighting it should use.
This happens in the Markdown syntax highlighting in VS Code when you make an inline code block.
Oh man, how cool is that!?
I was exactly upto it and seems like relevant thing is: https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#embedded-languages
This is how vscode markdown does it: https://github.com/microsoft/vscode/blob/master/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json
Parent repository: https://github.com/microsoft/vscode-markdown-tm-grammar