- Based on the official Premake5 Documentation
- Syntax definitions aligned with Premake5 Beta 8
I fed the Premake5 docs repo into Claude Opus.
- Complete Premake5 API coverage - All functions from the official beta 8 documentation
- Lua base language support - Full Lua 5.x syntax highlighting
- Premake value constants - Highlighted values for
kind,language,system,architecture, etc. - Token highlighting - Special highlighting for
%{}value tokens and%[]path tokens - Command tokens - Recognition of
{COPYFILE},{MKDIR},{DELETE}, etc. - Deprecated API warnings - Deprecated flags are visually marked
Includes a custom dark color scheme (Catppuccin Mocha-inspired) optimized for Premake5:
| Element | Color | Style |
|---|---|---|
Structure functions (workspace, project, filter) |
Purple/Mauve | Bold |
Build functions (files, links, defines) |
Blue | Normal |
Global functions (include, require, iif) |
Teal | Normal |
Module functions (os.*, path.*, string.*) |
Teal | Normal |
Global variables (_ACTION, _OPTIONS) |
Orange | Bold |
Value constants (ConsoleApp, C++17, windows) |
Green | Italic |
Tokens (%{cfg.buildcfg}) |
Yellow | Bold delimiters |
Command tokens ({COPYFILE}, {MKDIR}) |
Pink | Bold |
| Deprecated flags | Red | Underline |
Keywords (if, then, function) |
Purple | Bold |
| Strings | Green | Normal |
| Numbers | Peach | Normal |
| Comments | Gray | Italic |
To use your own color scheme instead, edit Premake5.sublime-settings and comment out the color_scheme line.
- 400+ completions covering all Premake5 APIs
- Smart snippets with tab stops for quick code generation
- Value suggestions - Context-aware value completions
- Module functions - Complete coverage of
os,path,string,table,http,json,io,term,zipmodules - Global variables -
_ACTION,_OPTIONS,_PREMAKE_VERSION, etc. - Token completions - Quick insertion of common tokens like
%{cfg.buildcfg}
- Complete workspace template
- Project template
- Library project template
- Debug/Release configuration template
- Precompiled header setup
- Integrated build system with variants for:
- Visual Studio 2017/2019/2022
- GNU Make (gmake2)
- Xcode
- CodeLite
- Clean and Help commands
- Download or clone this repository
- Copy the
Premake5folder to your Sublime Text packages directory:- Windows:
%APPDATA%\Sublime Text\Packages\ - macOS:
~/Library/Application Support/Sublime Text/Packages/ - Linux:
~/.config/sublime-text/Packages/
- Windows:
- Restart Sublime Text
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Select "Package Control: Install Package"
- Search for "Premake5"
- Press Enter to install
The plugin automatically activates for:
- Files named
premake5.luaorpremake4.lua - Files starting with
-- Premakeor-- premake
For other Lua files, manually set the syntax:
- Open Command Palette
- Select "Set Syntax: Premake5"
- Start typing any Premake5 function name
- Use
Tabto navigate through snippet placeholders - Type
premake5_to see available templates
- Open your
premake5.luafile - Press
Ctrl+B(orCmd+Bon macOS) to build - Use
Ctrl+Shift+Bto select a build variant
Ctrl+Shift+F- Insertfilter {}to reset filters
workspace, project, group, filter, configurations, platforms, location, filename, startproject, uuid, externalproject, rule, usage, uses
kind, language, architecture, system, toolset, files, removefiles, links, libdirs, includedirs, externalincludedirs, defines, undefines, symbols, optimize, warnings, buildoptions, linkoptions, targetdir, targetname, objdir, vpaths, pchheader, pchsource, forceincludes, and 150+ more...
cppdialect, cdialect, runtime, staticruntime, exceptionhandling, rtti, floatingpoint, vectorextensions, characterset, clr, inlining, callingconvention, visibility, pic, sanitize, openmp, linktimeoptimization
debugargs, debugdir, debugcommand, debugenvs, debugformat
prebuildcommands, postbuildcommands, prelinkcommands, buildcommands, rebuildcommands, cleancommands
- os:
chdir,copyfile,execute,findheader,findlib,getcwd,host,isdir,isfile,istarget,matchfiles,mkdir,outputof,remove,uuid, etc. - path:
getabsolute,getbasename,getdirectory,getextension,join,normalize,translate, etc. - string:
contains,endswith,startswith,explode,hash,sha1 - table:
contains,deepcopy,flatten,implode,isempty,join,keys,merge - http:
download,get,post - json:
decode,encode - io:
readfile,writefile - zip:
extract
- Value tokens:
%{wks.name},%{prj.location},%{cfg.buildcfg},%{file.name}, etc. - Command tokens:
{COPYFILE},{COPYDIR},{MKDIR},{DELETE},{MOVE},{RMDIR}, etc.