For those of you Lua programmer using notepad++, here is a simple how to add Lua function list to the notepad++
- Locate your %APP_DATA% folder, if you are using the zip distribution, go to your extraction directory
- Open functionList.xml
- On NotepadPlus >> functionList >> associationMap , see the commented LangID for LUA, on my installation it is 23
- Add the following
<association langID="23" id="lua_function"/> on that section - Creating the parser:
on NotepadPlus >> functionList >> parsers add the following section<parser id="lua_function" displayName="Lua" commentExpr="((--\[\[.*--\]\])|(--.*?$))"> <function mainExpr="function\s+(\w+[:\.])?(\w+\s*\(\s*[\w,\s]*\s*\))" displayMode="$className->$functionName"> <functionName> <nameExpr expr="\w+\s*\(\s*[\w,\s]*\s*\)"/> </functionName> <className> <nameExpr expr="[\w]+(?=[\s]*[:.])"/> </className> </function> </parser>
- Warning: if you copy paste xml content on line 5, please make sure that the xml properties are in one line, if they appear to be 2 line, it is because html page wordwrapping ;)
- Restart notepad++
- Open your lua file, open function list panel (Menu >> View >> FunctionList)
If the functions is not showing, chances are :
- You are using Gary's mod lua lexer.. uninstalling it should overcome the problem
- Wrong language ID noted from step 3
That's all! :)
Have fun!
Thank you so much for this! I have been googling for the past 30 minutes to find a solution. I love notepad++ and I need lua function list.
BalasHapus