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
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.