atom-asciidoc-preview
atom-asciidoc-preview copied to clipboard
Use pygments as source-highlighter
Description
I'd like to use pygments as the source highlighter because I want to use its option to highlight pure PHP without the <?php tag (https://github.com/asciidoctor/asciidoctor/pull/2015). Is it possible? Thank you for considering this.
- Atom version: 1.25.0
- OS: Ubuntu Bionic (development)
-
asciidoc-preview
version: 2.10.4 -
language-asciidoc
version: 1.11.0
Syntax example
echo "hello world!";
should be highlighted.
This is very unlikely, IMO. It would mean spawning a separate process to invoke Pygments, which would also add the overhead of finding the right python with the right package installed to execute it. It's going to cause more problems than it solves.
We have chosen highlights as the syntax highlighter in this package. It highlights code in the preview the same way the code is highlighted in the source editor, and with very little overhead. I think that's the right choice for this package.
I really don't see a good reason to integrate Pygments just to deal with what looks like a bug or deficiency in the PHP language support. Let's deal with the problem directly.