267 questions
0
votes
0
answers
52
views
global gtags for python: can't create tags and can't find the tags
I use ubuntu 22.04 and I saw there is already configure file /etc/gtags/gtags.conf from ubuntu package "global". In the configuration file, there is already the configurations of pygments-...
0
votes
1
answer
55
views
Configuring wagtail-markdown to use Prism instead of Pygments
Is there a way to inject a class into the <code> tag produced by wagtail-markdown so that I can style my Markdown code blocks with Prism instead of Pygments, which is the default syntax ...
0
votes
0
answers
15
views
Beautify JSON with Pygments, but concatenate short lines
I'm using Pygments to beautify JSON. The data has lists of lists, where the inner lists always have 3 short (10 chars) entries. Is there a way to tell Pygments to put those 3 on one line to shorten ...
0
votes
0
answers
164
views
Code highlighting with Markdown, Pygments and CodeHiliteExtension in Django. Regular code blocks work nice, but inline code like `print("hi")` doesn't
I have a problem with Markdown, Pygments and CodeHiliteExtension in Django. I have a blog post written in Markdown, then I have a save function like that:
def save(self, *args, **kwargs):
#...
2
votes
0
answers
572
views
Sphinx: custom Pygments' lexer not found
I created Pygments customized lexer and style:
acetexlexer.py (lexer file),
acedracula.py (style file),
that work pretty well since the following command returns the expected result:
pygmentize -O ...
0
votes
0
answers
68
views
Pygments style less accurate than Ace editor theme
The joined image shows a same syntax highlighted (LaTeX) code in two blocks codes, both with the same Dracula style/theme:
the first one with Pygments,
the second one with Ace Editor.
As one can ...
-1
votes
1
answer
186
views
why doesn't pygments discover my custom lexer after installation
i've developed and tested a custom pygments lexer, as described here... i then prepared a pyproject.toml file whose contents are as follows:
[build-system]
requires = ["setuptools"]
build-...
0
votes
0
answers
835
views
Change background color of output cell in JupyterLab
I am using pygments to highlight some syntax in a jupyter notebook. Here a minimal code to reproduce the issue:
from IPython.display import display, HTML
from pygments import highlight
from pygments....
0
votes
1
answer
1k
views
Django - create code blocks in html templates
I would like to create a web page that will display data I have in a table inside a code block just the way it is here, even with a copy function.
I can already display the data on the page, I just ...
1
vote
2
answers
364
views
Disable stripping of trailing newlines from code blocks
I'm creating an Asciidoctor document with some code blocks. I'm using pygments as syntax highlighter.
In the output, trailing empty lines in a code block are removed. Normally that's fine, but in some ...
1
vote
1
answer
477
views
No valid lexer class found error when testing custom Pygments lexer
I put together a lexer that should ideally work for psuedocode, but when I test it using python3 -m pygments -x -l ./psuedo.py:PseudoLexer test.pseudo, I keep getting the following error: "no ...
0
votes
1
answer
195
views
Why GNU Global doesn't index Pascal files of a project?
I'm trying to index the Pascal files of a project, on Linux (modern Ubuntu).
I've followed the instructions, but I'm very confused because of several factors.
The procedure I've applied is:
$ apt ...
3
votes
1
answer
138
views
Any Pygments lexer for the Mustache templating language?
I'd like to list source code of Mustache templates in my paper, and I'm using the minted package for highlighting code in my LaTeX source. The minted package simply uses Pygments. But there isn't any ...
5
votes
1
answer
12k
views
"pygmentize: command not found" Even though I already installed pygments on my system
I tried installing pygments on Debian 9 using both apt-get install python3-pygments and pip install Pygments but no method makes it work on the command line.
My suspicion is that my PATH doesn't ...
1
vote
1
answer
574
views
pygments highlight print in jupyter
I would like to print a string with sql into my jupyter notebook like below
This was done manually with pygments, see
Here is what I tried so far
from pygments import highlight
from pygments.lexers ...