public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* How to adjust the lexer used by pygments highlighting
@ 2023-01-22 14:30 Simon Sobisch
  2023-02-10 17:07 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Sobisch @ 2023-01-22 14:30 UTC (permalink / raw)
  To: GDB User Mailing List

The highlighting via pygments actually works quite fine in general, but 
in some cases it uses the wrong lexer and then has bad results.

It _seems_ that pygments' "filename (extension) based" language lookup 
is not used, because tested files using `pygmentize` are always well 
colored, the ones in GDB sometimes use the wrong lexer.

Question: How can we adjust the lexer used by pygments syntax 
higlighting in GDB for a given file?

Is it possible to setup a filename extension-based selection when GDB 
does not know of the language ("set language " _seems_ to have no effect 
on highlighting, but that would only work if the language is known to 
GDB)? If not can the "normal" extension list [1] be added to GDB or the 
decision which lexer to be used passed on to pygments?

Thank you for any insights,
Simon

[1]: https://pygments.org/languages/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-10 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-22 14:30 How to adjust the lexer used by pygments highlighting Simon Sobisch
2023-02-10 17:07 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).