Use pygments for syntax highlighting in code block
ncarboni opened this issue · comments
While the list of supported languages for code blocks is quite long, some are still missing (ex: SPARQL).
I was wondering it if it is possible to use pygments as syntax highlighter instead (or other ones).
Alternatively, as the syntax of some of the language I used are already available for ST, do any know of any guide on how to add them to MarkdownEditing? I would love to use them in code blocks.
Highlighting text/source fully relies on ST's syntax engine. It is not possible to use pygments, tree-sitter or any other highlighting engine.
What is needed to highlight fenced code blocks, is:
-
a syntax definition that ST understands (e.g.:
<Name>.sublime-syntax
) -
a context in Markdown.sublime-syntax which
embed
s that syntax.
Thank you! I will make some tests and, If I manage to make something work, I will do a pull request