Lua is dynamically typed. When LuaDebug cannot infer a variable’s type, use tags to help.
Tag format
- Form:
[FileName#TypeName]. Before#is the owning file; after is the table / type name. - Typing
[inside a comment triggers suggestions; outside comments it does not. - Arrays: append
<>, 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_; true shows “fileName/M_”.luadebug.moduleNames: names treated as module return tables (default M_ / _M / M).luadebug.defineModule: functions that define a module/class (e.g. class, this).luadebug.ctorNames: ctor names; self.xxx assignments there get jump priority.