wesnoth/utils/emmylua
2024-09-03 13:37:34 -04:00
..
wesnoth Update units.lua 2024-09-03 13:37:34 -04: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] Mark filesystem.asset_type as an enumerator 2024-08-13 08:54:04 -04:00
gui.lua Fix indices in widget.add_item_of_type()/add_item()/remove_items_at() (#8516) 2024-09-03 14:17:57 +02: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] Suppress some diagnostics and also recommend suppressing certain diagnostics globally 2024-08-13 08:54:04 -04: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.type.weakNilCheck": true,
"Lua.type.weakUnionCheck": true,
"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"
]