Skip to content

chris-be/lua-d-premake5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Lua Language Server Addon for premake5

This is an addon that can be used by the Lua Language Server.

It provides some definitions for premake5

Naming used:

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

Example:

  • Premake.config : premake.config working on Premake.Config
  • Premake.Config : Premake.Config instance
  • premake, _OPTIONS, _ACTION
  • table.?, string.?, io.?, os.?
  • path.???

Reminder

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

Example:

  1. lua source:
---@module 'premake5'
verbosef("Running in 'premake %s'", _PREMAKE_VERSION)
  1. 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/" ]
}

About

Lua Language Server Addon for premake5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages