Skip to content

Commit 4e1f7dc

Browse files
committed
Add new function list info into config-files.md
Close #128
1 parent e6d386d commit 4e1f7dc

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

content/docs/config-files.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,34 @@ The `<WordsStyle>` `colorStyle` attribute decides whether to use the defined col
195195
* Set `colorStyle="0"`: this style will inherit both the foreground and background colors from the Default style (equivalent to right-clicking both the foreground and background colors in the UDL styler dialog box)
196196

197197

198-
## `functionList.xml`
198+
## `Function List`
199199

200-
Defines what counts as a "function" for **View > Function List**. There are some comments in the file, and lots of examples of the builtin languages, which you can customize.
200+
Defines what counts as a "function" for **View > Function List**. There are some comments in the file(s), and lots of examples of the builtin languages, which you can customize.
201+
From v7.9.1 the file structure of function list parsers have been changed, so please follow one of sections below according your Notepad++ version.
202+
203+
### v7.9.1 and later versions
204+
205+
The `functionList` folder contains a separate XML file (function list parse rule) for each language's function list capability.
206+
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.
207+
208+
[overrideMap.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/functionList/overrideMap.xml) is optional. When you need to override a default parser rule or to define a function list parser for your User Defined Language (UDL), you modify this file.
209+
210+
* Override a default parser rule examples
211+
```
212+
<association id= "anotherPhpParser.xml" langID= "1" />
213+
<association id= "myPerlRule.xml" langID= "21"/>
214+
```
215+
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.
216+
217+
* Define your UDL example
218+
```
219+
<association id= "krl.xml" userDefinedLangName="KRL"/>
220+
```
221+
Here you define a parser rule file name for your KRL UDL. While you open a file which is recognized as KRL file, then function list engin 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.
222+
223+
### v7.9 and previous versions
224+
225+
The `functionList.xml` config file contains XML entries for each language's function list definition, as well as a map that tells Notepad++ which section of the XML is applied to each file type.
201226

202227
If you want to add **Function List** capability for your User Defined Language (UDL), you can. You need to add two groups of information:
203228

@@ -210,7 +235,7 @@ If you want to add **Function List** capability for your User Defined Language (
210235
where `fn_udl_example` is a name unique to this UDL. It is best to define it both
211236
based on `userDefinedLangName=...` (which must match the name you saved for your UDL) and on extension `ext=...` (which must match the extension(s) of your UDL type, with one extension per entry).
212237

213-
2. In the `<parsers>` section, add a parser, with a similar format to all the builtin parsers shown. An example would be
238+
2. In the `<parsers>` section, add a parser, with a similar format to all the builtin parsers shown. An example would be
214239

215240
<parser
216241
id="fn_udl_example"

0 commit comments

Comments
 (0)