Skip to content

Ketho/vscode-wow-api

Repository files navigation

WoW API

Adds IntelliSense features for World of Warcraft API to VS Code. This is a plugin extension for Sumneko's Lua Language Server with LuaCATS annotations.

Features

  • Parses Warcraft Wiki pages for API documentation
  • Lua shorthand references e.g. format (string.format) and tinsert (table.insert)
  • Custom WoW Lua functions e.g. wipe and strsplit

  • Enum and Constants table
  • LE_ Lua Enums

Shows completion for GlobalStrings at >3 uppercase letters to declutter fuzzy search.

Contributing

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. Otherwise feel free to create an issue with the false errors.

For example UnitLevel would be documented like so.

{{wowapi}}
Returns the level of the unit.
 level = UnitLevel(unit)

==Arguments==
:;unit:{{apitype|string}} : [[UnitId]]

==Returns==
:;level:{{apitype|number}}

Alternatively, the script will look for a commented block if present.
(This only looks for global APIs not documented in Blizzard_APIDocumentationGenerated, it won't look for Widget APIs and FrameXML functions)

<!-- emmylua
---@param unit UnitId
---@return number level
function UnitLevel(unit) end
-->

Setup

Refer to SETUP.md if you want to run the Lua scripts which generate the documentation.

Acknowledgements