My understanding is that there's two versions of Function List. One is the built-in feature of NP++ and the other is a plugin who's latest version is from 2010. Is this accurate?
You are right.
The built-in version is relatively new and still under development. So, it will include new features in next few N++ versions, where as plugin version in not under development any longer.
When upgrading to the latest np++ version I automatically disabled my Function List plugin because of "Stability Issues". Thus I decided to try the innate version.
I've been having trouble getting the built in version to work. I've added a php parser and initialization, but I can't get it run. It always shows up blank. Any ideas?
I had trouble writing my own at first too, it was always blank. I had copied the regexp for comment lines from one of the examples, but for some reason it just didn't like it and kept thinking the entire file was one huge comment, and thus, never showed any functions. I rewrote the regexp for comments and it was fine after that.
I just wrote another one for YAML. Some helpful tips debugging this stuff:
If the function list panel is completely empty, that means it didn't match the association tag. If you see the file name at the top, that means the associate worked, but there is a problem in your parser definition.
Note: when using a file extension to match your association tag I had to define it with the leading dot, although other examples I found weren't doing this.
<association ext=".EXT" id="my_new_lang_function"/>
This was very helpful, thank you! <quote>"If the function list panel is completely empty, that means it didn't match the association tag."</quote> in particular helped me figure out that I needed to add extensions even for the built in languages.
While I was able to get a test .cpp file to be recognized, I was not able to get it to parse. More importantly, I couldn't even get my .php files to be recognized and associated :(
Here is my association tag:
\<association langID = "1" ext=".php" id="php_function"/>
(minus the '\' of course)
You wouldn't need both ext= AND langID in the same tag, just langID="1" for PHP should suffice.
Whether it should or not, it did help my cpp get recognized when I added "ext='.cpp'".
\<association langID = "3" ext=".cpp" id="c_cpp_function"/>
Are you sure you edit the right "functionList.xml"?
You should edit "%APPDATA%\notepad++\functionList.xml" but not "NPP_INSTALLED_DIR\functionList.xml".
The second one is use as model to copy in "%APPDATA%\notepad++\" directory, in case "%APPDATA%\notepad++\functionList.xml" is absent.
Thank you for the reminder! That got it to work for me. :)
Does this apply even when Don't use %APPDATA% was chosen at install time?
May I suggest to keep the names consistent by renaming the local function list file to "functionList.model.xml", just like for langs and config?
I resolved the issue of the function list not recognizing the newly supported file types (php in my case) by:
Apparently, the installer didn't update the files in "%APPDATA%\notepad++\ when I upgraded Notepad++.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.