-
1) Pandoc uses KDE .theme files (JSON) to map a style (color, face, ...) to the various "roles" a piece of your code can have (keyword, operator, property, ...). Check this to learn more about those theme files. You can use this boilerplate as a base to create your custom theme. Refer to this guide for more details about which keys in the .theme file correspond to which parts of the code.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions
2) Pandoc invokes the skylight Haskell library, which uses XML syntax descriptions to define which tokens/pieces of a given language have which "role". Skylight will parse your code and tag each part of it according to those rules. You can edit those XML files (or create new ones). Check this page for a description of how they work. You'll find the existing KDE XML syntax descriptors here.
-
2) Pandoc invokes the skylight Haskell library, which uses XML syntax descriptions to define which tokens/pieces of a given language have which "role". Skylight will parse your code and tag each part of it according to those rules. You can edit those XML files (or create new ones). Check this page for a description of how they work. You'll find the existing KDE XML syntax descriptors here.