Notepad++ supports around 90 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
You can use the CollectionInterface plugin to download and install UDLs (and associated files) from the UDL Collection:
- If you haven't done so already, in Notepad++ v8.8.1 or newer, you can go to Plugins > Plugins Admin, checkmark
☑ CollectionInterface
, click Install. After Notepad++ restarts, Plugins will have the CollectionInterface plugin. - Plugins > CollectionInterface > CollectionInterface: Download
- Scroll through the UDL tab to see all the UDLs available:
- Click on the UDL you want
- if the selected UDL also has an associated AutoCompletion and/or FunctionList file, you can checkmark those options to grab them all at the same time.
- (You can download the AutoCompletion or FunctionList files separately using the appropriate tabs in the CollectionInterface: Download dialog, but it's easier to just grab them all at the same time from the UDL tab)
- Click Download.
- After the progress bar reaches 100%, you can Close.
- It will ask if you want to restart Notepad++ (which you need to do, in order for the UDL(s) to be available).
If you want to manually install a new User Defined Language from this collection.
- 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 a functionList XML file for that UDL, you may download it from the
functionList\
folder of the repository (using similar download procedure as described in step 2 above), and put it in a file in thefunctionList\
sub-folder of your Notepad++'s%AppData%\Notepad++\
or other configuration location (including that sub-folder in your installation directory). More details can be found in the online User Manual in the "functionList" and "functionList 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 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.