Windows – How to get Notepad++ to correctly syntax highlight a *User Defined* language

notepadwindows

NP++ 6.8.5 (latest)

I added a language to Notepad using the 'Define Your Language', 'Import' function. This works great. However, I have to explicitly indicate the language type every time I open a file. The XML that I imported defined the three extensions that my language uses, but it's not recognizing them.

I tried associating the extensions in the Style Configurator dialog, as suggested in multiple similar questions here on SU, but my user-defined language does not appear in the list of available languages in the list box.

Is there some other file or function that I can use to achieve this?

My previous version of NP++ didn't have this problem, syntax highlighting always worked until I upgraded.

Best Answer

My user-defined language does not appear in the list of available languages in the list box.

User defined languages are automatically added to the "Language" menu.

  • They appear after the horizontal separator in the menu.

  • You have to restart Notepad++ after installing the new language.

    enter image description here

  • "Apache" and "Progress" are User Defined languages.

  • If you open files with the correct extension, eg .i they will have the lang auto selected to "Progress" and will be styled as appropriate.

User defined languages do not appear in the "Language Menu" list box.

  • Only built-in languages appear there.

    Menu "Settings" > "Preferences" > "Language Menu" tab:

    enter image description here

User defined languages do not appear in the "Style Configurator" dialog.

  • Only built-in languages appear there.

    Menu "Setting" > "Style Configurator":

    enter image description here

There are some Notepad++ patches for installing User Defined languages.

  • These patches are more than just XML language definitions.

  • An example is Progress 4gl / ABL "adds support for Progress 4gl / ABL: Syntax highlighting, block folding and auto completion"