-
-
Notifications
You must be signed in to change notification settings - Fork 39
Home
The AddOn namespace needs to be annotated with @class in each file. This way the language server knows about the shared table and also allows you to mutate it.
file1.lua
---@class ns
local ns = select(2, ...)
ns.foo = "hello"
file2.lua
---@class ns
local ns = select(2, ...)
ns.bar = "world"
The class name (e.g. ns
) does not need to be unique unless there are multiple addons in your workspace.
If you intend to use deprecated APIs for Classic, the warning and strikethrough can be removed by disabling its diagnostic.
There is currently no targeted support for Classic Era and Cataclysm Classic. But the hover tooltip will show the flavors a function exists in.
The extension reflects the state of the wiki, so if you create/update the wiki pages, it will be updated in the extension on the next release. Only functions on https://warcraft.wiki.gg/wiki/World_of_Warcraft_API which are not documented in Blizzard_APIDocumentationGenerated will be synchronized.
For example UnitLevel would be documented like so.
{{wowapi}}
Returns the level of the unit.
level = UnitLevel(unit)
==Arguments==
:;unit:{{apitype|UnitToken}}
==Returns==
:;level:{{apitype|number}}
Alternatively, the script will look for a commented block in the wikitext of the API pages.
<!-- luals
---@param unit UnitToken
---@return number level
function UnitLevel(unit) end
-->
- Linux: Refer to SETUP.md if you want to run the Lua scripts which generate the documentation.
- Windows: I personally use LuaRocks on Windows but currently in the process of switching to WSL
- Blizzard Entertainment
- LuaLS - Sumneko, carsakiller
- Townlong Yak - Foxlit
- Wago Tools - QartemisT
- Warcraft Wiki - Kaydeethree, Surafbrov
- WowAce - Kaelten
- WoWInterface - Cairenn
- Wowprogramming - jnwhiteh
-
WoW.tools - Marlamin
- VS Code extension: ChrisKader, DakJaniels, thatnerdjosh
- Annotations: Kozoaku, Numy, Oppzippy, Snakybo, Torhal, Wutname
- FrameXML mirrors: funkydude, Gethe, Meorawr, Tekkub
-
Warcraft Wiki editors: DahkCeles, Foxlit, Iriel, Numy, plusmouse, Xelnath
- Andols for helping out with LuaSocket on Windows
- ChrisKader for work on the extension and improving LuaLS annotations
- Cidan for advocating LuaLS types and career advice
- DahkCeles for collaborating on the wiki and writing templates
- Ferronn for his crazy rabbit hole wowless project
- Foxlit for LuaDBC and developing Townlong Yak
- Meorawr 💙
- Nevcairiel for Ace3 and posting on WowAce threads
- Numy for generating LuaLS annotations and documenting WoW API
- Stanzilla for always supporting and getting us on beta lists
- Yuyuli for kickstarting the initial EmmyLua project