How to add XQuery syntax highlighting to NotePad++ (NPP) 7.x?

1.6k Views Asked by At

The NPP 7.x installation misses XQuery syntax highlighting. How to add it?

1

There are 1 best solutions below

0
Alexander Schäl On

As written on https://community.notepad-plus-plus.org/topic/17543/xquery-udl/4 just import https://github.com/robwhitby/NotepadPlusPlus-XQuery/raw/master/userDefineLang.xml via language → define your language → import to NotePad++, restart NPP and enjoy highlighted ".xql"-files - or ".xq" resp. ".xquery" when modifying the "ext" attribute at the tag of the userDefineLang.xml before ;)

Of course you can modify the colors - for example to look nice in the NP++ built-in DarkMode as well, to get rid of the strange Font-Names that contains Chinese "poetry"* or just to add XML comments to the comment-highlighting:

<Keywords name="Comments">00&lt;!-- 01 02--&gt; 03(: 04:)</Keywords>

or highlight apos-delimited strings the same way as quoute-delimited ones:

<Keywords name="Delimiters">00&apos; 01\ 02&apos; 03&lt; 04 05&gt; 06&quot; 07\ 08&quot; 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>

*) Those "font names" contains things like The answer to the question "What is the best way to deal with this problem? The main item in the table of the table is the tentacles. Thank you for your time and attention., Stake out the meat by pressing the button or The government of the Republic of China has been appointed as the head of the government. Thank you very much. ;)