syntax highlighting for XQuery

Asked by David Graf on 2011-10-12

I am working for an XQuery project that is hosted on launchpad. Unfortunately, launchpad doesn't support XQuery syntax highlighting. Would it be possible to contribute XQuery syntax highlighting somehow? We would be happy to implement it ourselves.


Question information

English Edit question
loggerhead Edit question
No assignee Edit question
Last query:
Last reply:
Assigning to loggerhead, the project that provides code browsing in Launchpad.
Jeroen T. Vermeulen (jtv) said : #1

This looks tightly related to question 53369 in loggerhead: currently there's no support for this, but it ought to be possible to build it.

David Graf (davidagraf) said : #2


What do you mean with "there's no support for this"? Is there no support for XQuery syntax highlighting or to contribute syntax highlighting? We would really like to contribute.


Gary Poster (gary) said : #3

Loggerhead incorporates Pygments now. Loggerhead, via Pygments, does support syntax highlighting.

Pygments thinks it supports XQuery ( It may be that Loggerhead/Pygments doesn't identify XQuery correctly somehow in order to trigger the proper highlighting. Could you point to an example of where it is not working, so we can investigate what is going on?



David Graf (davidagraf) said : #4

Here is an example:

Some syntax highlighting is done. But it is far from complete.


Gary Poster (gary) said : #5

I see, David. Thanks for the example.

You can start by making a branch of Pygments ( and changing what you want to see. Make a pull request to the Pygments maintainer and have him accept it. Then, hopefully he will make a release, and you can ask us to update to the newer Pygments.

If he doesn't seem to make a release in a timely manner, let us know, and we can make our own internal release just for Loggerhead.

David Graf (davidagraf) said : #6

Hey Gary

Which pygments version do you currently have installed in loggerhead? Because github is using pygments too. There, the syntaxhighlighting is much better (but not complete too), see

Maybe, an upgrade fixes a lot of issues already.

Gary Poster (gary) said : #7

Hi David. We are currently using the newest released Pygments (1.4) plus an unreleased bugfix. Within seven days we should be using the very newest unreleased Pygments from their trunk, in order to get another bugfix we pushed upstream.


Jeroen T. Vermeulen (jtv) said : #8

Thanks to Gary for stepping in. I was going by completely obsolete data!

Can you help with this problem?

Provide an answer of your own, or ask David Graf for more information if necessary.

To post a message you must log in.