Skip to content

Feature for matching function list in Lua #4563

@dvdvideo1234

Description

@dvdvideo1234

Description of the Issue

Function list is not extracting the function names for Lua

Steps to Reproduce the Issue

  1. Install notepad++
  2. Tell it Do not use %appdata%
  3. Edit functionList.hml
  4. Add <association id="lua_function" langID="23"/>
  5. Add the function extractor:
<parser id="lua_function" displayName="Lua" commentExpr="--[^\n]*">
          <!-- Basic lua table view, nested lua table not supported -->
          <classRange
              mainExpr="[.\w]+[\s]*=[\s]*\{"
              openSymbole="\{"
              closeSymbole="\}"
              displayMode="node">
              <className>
                  <nameExpr expr="[.\w]+"/>
              </className>
              <function
                  mainExpr="[.\w]+[\s]*=[\s]*['&quot;]?[\w]+['&quot;]?">
                  <functionName>
                      <funcNameExpr expr=".*"/>
                  </functionName>
              </function>
          </classRange>
          <!-- Basic lua functions support -->
          <function mainExpr="((\s+(local)\s+(function)\s+[^0-9][_A-Za-z0-9]+)|(\s+(function)\s+[^0-9][_A-Za-z0-9]+)|(\s+(local)\s+[^0-9][_(\.)A-Za-z0-9]+\s+(=)\s+(function))|(\s+[^0-9][_(\.)A-Za-z0-9]+\s+(=)\s+(function)))"
                      displayMode="$functionName">
              <functionName>
                <nameExpr expr="[^0-9][_A-Za-z0-9]+\s*\("/>
                <nameExpr expr="[^0-9][_A-Za-z0-9]+"/>
              </functionName>
            </function>
      </parser>
  1. Save the file

Expected Behavior

Function and classes to show up in the function viewer like c++ for example

Actual Behavior

Functions do not show up even if Notepad++ is restarted

Debug Information

Notepad++ (7.5.6) (32-bit)

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions