wesnoth/utils/emmylua
Subhraman Sarkar c3ef8084d5 wesnoth.terrain_types: add mvt_alias and def_alias
these expose `terrain_type::mvt_type()` and ``terrain_type::def_type()` respectively.
(#9969)
2025-03-14 08:55:18 +05:30
..
wesnoth
ai.lua
builtin.lua
config.lua
filesystem.lua
gui.lua lua: expose rich_label link handling mechanism 2025-01-23 09:14:54 +05:30
mathx.lua
plugin.lua Lua API: Plugins can now execute gamestate code once they are in the game context. 2025-01-15 09:46:42 -05:00
README.md GUI2 LuaAPI: expand widget attr support (#9497) 2024-11-19 22:41:47 -05:00
stringx.lua
wesnoth.lua wesnoth.terrain_types: add mvt_alias and def_alias 2025-03-14 08:55:18 +05:30
wml.lua

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"
]