Notepad++ supports around 80 programming languages for syntax highlighting & folding. For languages that are not in the list of languages with built-in support, someone may have created a User Defined Language (UDL) for adding syntax highlighting to the language and added it to this collection, or you can submit a UDL to this collection for others to use.
To learn all about User Defined Languages:
https://npp-user-manual.org/docs/user-defined-language-system/
Here is the UDL list and from where you can download:
https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/udl-list.md
For now, you have to manually install a new User Defined Language.
- Use Notepad++'s Language > User Defined Language > Open User Defined Language folder... menu entry to easily find the right
userDefineLangs\
folder to place your UDL definition file. (You can copy the path from the file Explorer location bar, for pasting into the Save As dialog in step 2) - Download the XML file from the
UDL list
of this Collection.- From the
UDL list
, click on the name of the file. - From the file's page, use the button labled "Raw" to open the source of the UDL.
From that raw file, you can either:- you can use your browser's Right Click > Save As... feature to save the raw XML file to the
userDefineLangs\
folder found in step 1 - copy the text of the file's contents, and paste it into a new file in Notepad++, and save it as an XML file to the
userDefineLangs\
folder found in step 1
- you can use your browser's Right Click > Save As... feature to save the raw XML file to the
- Warning: Do not just right click to try to download the file from either the
UDL list
or the directory listing on GitHub links, as either of those right-click actions will download the GitHub web page for that file (which HTML, and not the UDL's XML file and will not work). - Alternatives to step 2 can be found in the "Import a UDL" section of the official online user manual. But this version here is the easiest for those who haven't worked much with UDLs or GitHub.
- From the
- Restart Notepad++
- Without this restart, Notepad++ will not know about the new UDL.
- If the UDL author provided an autoCompletion XML file for that UDL, you may download it from the
autoCompletions\
folder of the repository (using similar download procedure as described in step 2 above), and put it in a file in theautoCompletion\
sub-folder of your Notepad++ installation directory. More details can be found in the online User Manual in the "autoCompletion" and "configuration files details" sections. - If the UDL author provided an sample file that uses that UDL, you may download that from the
UDL-samples\
folder of the repository. If you open that sample in Notepad++ after the restart from step 3, it should apply the UDL highlighting.
You can submit your UDL file(s) into this repo, or a (some) link(s) to where your UDL file(s) is (are) hosted. In both cases, you have to do a Pull Request on this repository.
More information about submitting your UDL to the Collection, please refer to:
https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/CONTRIBUTING.md
We populated the initial UDLs in this Collection based on the old NppWiki++ list of UDLs (archived at archive.org)
The original author of any UDL in this Collection may request that we remove it from the Collection (or submit a PR to do the same), and we will oblige.
This Collection is not for Feature Requests for the Notepad++ User Defined Language system. If you would like improvements to how Notepad++ uses or implements UDLs, you will have to check if the Notepad++ Issues already has an issue for your request, and if not, make the request there. Any feature requests for the system made in the Collection's repository will be moved to the Notepad++ issues list if possible, or will be closed with a message that says it was requested in the wrong place.
The maintainers of this Collection do not have the knowledge to make a custom User Defined Language definition on request -- you likely know your Language much better that we do. It is super simple to make your own UDL: paste your language's keywords into one or more of the eight keywords sections, put the appropriate operators into the operators inputs, possibly add some delimiters (like quote-pairs or parentheses pairs) and/or comments definitions and/or folding definitions; set the colors to match your desire, and enjoy. You can see the online User Manual's UDL description with the details on what all of those mean, and how to use it. Once you have a working UDL, you can share it with others by Contributing to the Collection. Any feature requests in this Collection's repository to "create the UDL definition for me" will be rejected: sorry.