wesnoth/utils/emmylua
2024-02-29 09:16:40 -05:00
..
wesnoth [LuaDoc] Use an alias for a sync function and declare every possible call form with @overload instead of specifying optional parameters 2024-02-29 09:16:40 -05:00
ai.lua [LuaDoc] Fix several errors in the inline documentation 2024-02-06 19:04:00 -05:00
builtin.lua [LuaDoc] Fix several errors in the inline documentation 2024-02-06 19:04:00 -05:00
config.lua Lua API: Add inline documentation for pretty much everything and convert existing docs (#6483) 2022-02-17 13:43:31 -05:00
filesystem.lua [LuaDoc] Document ndirs member of a directory listing 2024-02-06 19:04:01 -05:00
gui.lua [LuaDoc] Permit GUI widgets to have non-translatable labels, including numbers. 2024-02-13 19:29:21 -05:00
mathx.lua Lua API: Add inline documentation for pretty much everything and convert existing docs (#6483) 2022-02-17 13:43:31 -05:00
README.md Lua API: Add inline documentation for pretty much everything and convert existing docs (#6483) 2022-02-17 13:43:31 -05:00
stringx.lua [LuaDoc] Fix missing return type on format_*_list 2024-02-13 19:29:19 -05:00
wesnoth.lua [LuaDoc] Declare tstring to be concatenatable 2024-02-15 23:16:43 -05:00
wml.lua [LuaDoc] Fix incorrect declaration of unit.variables and side.variables - make them consistent with wml.variables 2024-02-13 19:29:20 -05:00

These files can be used to allow Lua linting tools to understand Wesnoth types and functions that are defined in C++. Documentation of the annotations format can be found here.

To enable in Visual Studio Code, install this Lua plugin and add the following settings to your settings.json:

"Lua.runtime.version": "Lua 5.4",
"Lua.workspace.library": [
  "./utils/emmylua"
],
"Lua.runtime.special": {
  "wesnoth.require": "require",
  "wesnoth.dofile": "dofile"
},
"Lua.runtime.builtin": {
  "io": "disable",
  "debug": "disable",
  "os": "disable",
  "package": "disable"
},
"Lua.diagnostics.globals": [
  "wesnoth",
  "wml",
  "gui",
  "filesystem",
  "unit_test",
  "stringx",
  "mathx",
  "ai"
]