Lua is dynamically typed. When LuaDebug cannot infer a variable type, tags help analysis.
Tag format
- Form:
[filename#TypeName]. The part before#is the file; after it is the table / type name. - Typing
[in a comment triggers suggestions; it does not pop up in code. - Arrays: append
<>after the type, e.g.[Model.TestModel#TestModel<>].
Tag kinds
@RefType— variable reference type@SuperType— parent type@return— return type@paramName : [xx#xx]— parameter type
Examples
--@RefType [Model2#MM_]
local data = cl1
--@SuperType [Base#BaseView]
local M = class("LoginView")
---@return [Model.Player#Player]
function createPlayer()
end
--@name : [Model.Player#Player]
function foo(name)
end
Related settings
luadebug.tagIsShowFileName: withlocal M_ = {}, tags often all show M_; set true to show “filename/M_”.luadebug.moduleNames: names treated as the module return table (default M_ / _M / M).luadebug.defineModule: functions that define a module/class (e.g. class, this).luadebug.ctorNames: constructor names; assignments to self.xxx in those functions get jump priority.