Skip to content

Commit 1f4fab0

Browse files
committed
more functionList clarification
1 parent 4ee0262 commit 1f4fab0

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

content/docs/config-files.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -303,23 +303,22 @@ Defines what counts as a "function" for **View > Function List**. There are some
303303

304304
### Function List Definitions
305305

306-
The `functionList` folder contains a separate XML file (function list parse rule) for each language's function list capability.
307-
Each function list parse rule links to a language with the language default name. For example the file name of php language parse rule is `php.xml`, the file name of Java language parse rule is `java.xml`, Check [overrideMap.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/functionList/overrideMap.xml) for the naming list of all supported programming languages.
306+
The `functionList` folder contains a separate XML file (function list parser definition) for each language's function list capability. Each function list parser definition links to a language with the language default name. For example the file name of php language parse rule is `php.xml`, the file name of Java language parse rule is `java.xml`, Check [overrideMap.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/functionList/overrideMap.xml) for the naming list of all supported programming languages.
308307

309308
For built-in languages that already have Function List behavior, editing [overrideMap.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/functionList/overrideMap.xml) is optional: if you edit the existing `functionList\XYZ.xml` for that language, you don't need to edit `overrideMap.xml`; however, if you create a new `functionList\my_XYZ.xml` that you want to use instead of the default function list definition for XYZ, then you need to copy the an `<association id="{filename.xml}"... />` for language XYZ from inside the `<!-- ... -->` comment block, paste it outside that block, and point the to the new file using `id="my_XYZ.xml`. If you need to link to a function list parser name "udl_ABC.xml" for your User Defined Language (UDL) named "ABC", you need to modify this file to add an `<association id="udl_ABC.xml" userDefinedLangName="ABC">` : the `id` must match the filename exactly, and the `userDefinedLangName` must match the name of your UDL, as seen in the **Language** menu and UDL dialog.
310309

311-
- Example: Override default parser rules for two languages:
312-
```
313-
<association id= "anotherPhpParser.xml" langID= "1" />
314-
<association id= "myPerlRule.xml" langID= "21"/>
315-
```
316-
If 2 above lines are in `overrideMap.xml`, function list will load your parsers `anotherPhpParser.xml` and `myPerlRule.xml` instead of loaoding `php.xml` and `perl.xml` while showing PHP and Perl function list respectively.
310+
- Example: Override default parser definition files for two languages:
311+
```
312+
<association id= "anotherPhpParser.xml" langID= "1" />
313+
<association id= "myPerlRule.xml" langID= "21"/>
314+
```
315+
If those two are in `overrideMap.xml` (and not commented out), then function list will load your parsers `anotherPhpParser.xml` and `myPerlRule.xml` instead of loaoding `php.xml` and `perl.xml` while showing PHP and Perl function lists, respectively.
317316
318-
- Example: Set the parser rule for your UDL called "KRL":
319-
```
320-
<association id= "krl.xml" userDefinedLangName="KRL"/>
321-
```
322-
Here you define a parser rule file name for your KRL UDL. When you open a file which is recognized as a KRL file, then the function list engine will load `functionList\krl.xml` to show the KRL function list. If you have no KRL UDL defined in your Notepad++, you have to define a dummy one (with the name "KRL") to make it work.
317+
- Example: Set the parser definition file for your UDL called "KRL":
318+
```
319+
<association id= "krl.xml" userDefinedLangName="KRL"/>
320+
```
321+
Here you define a parser rule file name for your KRL UDL. When you open a file which is recognized as a KRL file, then the function list engine will load `functionList\krl.xml` to show the KRL function list. If you have no KRL UDL defined in your Notepad++, you have to define a dummy one (with the name "KRL") to make it work.
323322
324323
The `functionList\`_languagename_`.xml` parser file itself, whether it's for a builtin language or a UDL-based language, requires the structure `<NotepadPlus><functionList><parser...>...</parser></functionList></NotepadPlus>`, where the attributes and contents of the `<parser>` are described in the documents section about [How to Customize Function List](../function-list/#how-to-customize-function-list). You can look at any of the [default parser files](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/functionList/) for examples of working Function List configurations.
325324

0 commit comments

Comments
 (0)