This is an addon that can be used by the Lua Language Server.
It provides some definitions for premake5
- "modules" are named as in
premake
sources: complete name in lower case - object instances are named like their corresponding "module" but with a first upper case letter
- some globals and extensions are defined
Premake.config
:premake.config
working onPremake.Config
Premake.Config
:Premake.Config
instancepremake
,_OPTIONS
,_ACTION
table.?
,string.?
,io.?
,os.?
path.???
You can use it without an "addon manager" (whose availability depends on your IDE).
- configure luals through a
.luarc.json
file (by setting accordingly "workspace.library" and "diagnostics.globals") - simulate
require("premake")
in your lua file
- lua source:
---@module 'premake5'
verbosef("Running in 'premake %s'", _PREMAKE_VERSION)
- luarc.json
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"runtime.version": "Lua 5.3",
"runtime.fileEncoding": "utf8",
"hint.enable": true,
"workspace.library": [ " PATH ROOT TO YOU LOCAL COPY /lua-d-premake5/library/" ]
}