Repository navigation
v1.0.0
Added
- Language server (separate Node process; IPC in VS Code,
--stdiofor other editors) with
syntax diagnostics from the official Lua 5.2.4 compiler, built to WebAssembly from the
checksum-verified lua.org tarball (third_party/lua52/, reproducible build checked in CI). .menusupport: newie-menulanguage (case-insensitive.menuextension), TextMate grammar
that highlights the engine's keywords and embeds Lua where validation finds it, and validation of the Lua the engine compiles, found with a lexer
that follows the engine's (per IESDP):
`…`blocks;onOpen,onCloseandaction*scripts; and the expressions ofenabled,
actionDrag,table,seperator,useOverlayTint,bitmap resand everyluavalue. A value
can be"…",'…'or an unquoted word that is not a keyword, anywhere on a line. Each is
compiled in the shape the engine compiles it: property code as the body of
function f () … end(so...and a trailing--comment are errors), expressions as its
returnvalue, and`…`blocks without their last character, which the engine drops.
slotinfo,spellInfoandmemorizedSpellInfostrings are checked in every expression and
statement the engine generates from them (T.item.icon,Infinity_SwapSlot(T.id), …)..menudiagnostics for text the engine misreads (codes are stable):menu-unterminated-string
for"and'strings,menu-unterminated-block, and the newmenu-word-too-long(error: an
unquoted word of 64 or more characters aborts the game),menu-inline-lua-last-character
(warning: the character before a closing backtick is dropped) andmenu-unquoted-underscore
(warning: unquotedMy_Menuis read asMyandMenu).- Settings
ieLua.validate.mode(manual,save(default),type,saveAndType) and
ieLua.validate.debounce(default 300 ms). - Command IE Lua: Validate Current File (
ieLua.validateDocument). - Document symbols (
textDocument/documentSymbol; outline, breadcrumbs, Go to Symbol in
Editor): functions and methods at any depth, top-level locals, the first assignment to each
global, and named table fields; in.menufiles, eachmenublock by itsname, holding the
Lua symbols inside it. FlatSymbolInformationfor clients without hierarchical support. - Folding ranges (
textDocument/foldingRange): function bodies,do/while/for/repeat,
eachif/elseif/elseclause, multi-line tables, call arguments and long strings, long
comments and runs of--lines; in.menufiles every{ … }block,`…`blocks and
"…"scripts, plus the Lua inside them. The closing line stays visible. Honors the client's
rangeLimitand supported kinds. - Go to definition (
textDocument/definition): from any use of a local to its declaration, and
from a global to every assignment to it (x = …,function x()), in the document and in
every other.luaand.menufile of the workspace. The engine runs "in one global Lua state
that is shared by the MENU file, the game's own Lua files and the engine"
(IESDP), so a
global is matched by name in every file; locals stay in their own chunk. No result for the
implicitself, for globals no file assigns (game, EEex and library functions), or for table
fields. - Find references (
textDocument/references), with the same matching as go to definition: the
uses of a local, including the implicitselfof a method, or every use of a global in the
document and in the other files.includeDeclarationdecides whether the local's
declaration, or the assignments to the global, are included. - Across files, for go to definition and find references: the other files are the open
documents, whose unsaved text wins over the saved file, and the files of the workspace index
(the files of workspace symbols,files.excludehonored). The document's own results come
first, then the other files in URI order. A request waits for files still queued for
indexing, and answersContentModified(LSP 3.17) if the document changed meanwhile._ENV,
and names resolved through a local_ENV(fields of that table, Lua 5.2 manual §2.2), are not
globals: they have no definition or references, in the document or elsewhere. - Rename (
textDocument/prepareRename,textDocument/rename) within the document, for locals
and for globals the document assigns. Refused, with a reason localized in VS Code: anything
that is not a variable (including_ENVand names resolved through a local_ENV), the
implicitself, globals the document never assigns (defined in another file, the game or
EEex), code with syntax errors where the variable can occur, new names that are not Lua names
or are reserved words, and any rename that would change what a name
refers to, including moving a name into or out of a local_ENV(checked by re-analyzing the
renamed text). Edits are versioned when the client
supportsdocumentChanges. - Workspace symbols (
workspace/symbol; Go to Symbol in Workspace): the outline symbols of every
.luaand.menufile (any letter case) in thefile:workspace folders, and of every open
document, whose unsaved text wins over the file. The query matches loosely (its characters in
order, case-insensitively), as LSP recommends. Files are indexed in the background, one per
event-loop turn, and kept current through watched-file events (**/*.[lL][uU][aA],
**/*.[mM][eE][nN][uU], and creates and deletes of folders), workspace folder changes and
document closes.files.excludeis honored as VS Code's explorer applies it, with an original
matcher checked against VS Code's own; changing it rescans. - Hover (
textDocument/hover), in Markdown or plain text as the client prefers:- Lua 5.2 library functions, values and module tables, with the text of the
Lua 5.2 manual verbatim and a link to the entry:
the basic functions and thestring,table,math,bit32anddebuglibraries, the ones
the engine opens (IESDP), also as_G.string.formatand("x"):rep(). The text is generated
fromdoc/manual.htmlof the checksum-verified Lua 5.2.4 tarball (npm run lua-manual, checked
in CI) and is identical to the online manual's.io,os,package(require) and
coroutineare not documented, as the engine does not provide them. print: a note that the engine replaces it, linking IESDP's Engine Lua globals, instead of
the manual's description.- EEex and game functions (
EEex_*,Infinity_*,C:AddGold, also called asC.AddGold):
the name and a link to EEex-Docs; no EEex-Docs text is copied. - Locals and globals of the document: how they are declared (
local function f(a, b),
(parameter) a,(for variable) i,(global) function G(x)), from the first assignment for
a global, shared across the Lua chunks of a.menufile. - No library text for names a local shadows (
local string = {}), globals or library members the
document assigns itself (string = …,string.format = …,function string.trim()), or names
resolved through a local_ENV. - The server's own labels are localized into the 14 VS Code display languages from the client's
locale(InitializeParams.locale), in every editor.
- Lua 5.2 library functions, values and module tables, with the text of the
- Completion (
textDocument/completion,completionItem/resolve; triggered by.and:), with
the rules of hover so that a completed name hovers as offered:- Variables: the locals visible at the cursor (the innermost of each name, the implicit
selfincluded), then the globals the document assigns (in any Lua chunk of a.menufile),
the Lua 5.2 library globals the engine opens, the EEex and game functions, and the keywords.
Each name once, from the first of these that has it. While a local_ENVis visible, only
locals and keywords. Keywords are the 22 reserved words (manual §3.1); in.menuexpressions
(enabled "…", …) onlynil,false,true,function,not,andandor(§3.4). - Members of globals (
_G.prefixes removed): after_G.the globals; aftert.andt:the
fields the document assigns ont; the manual's members ofstring,table,math,
bit32anddebug, unless the document assigns the module table or defines that member;
EEex-Docs names after the operator they are documented with (EEex_Options_Option.new,
C:AddGold). After("…"):, the string library (§6.4). Nothing after locals, calls or
indexes (no type inference). - Nothing in comments, strings and numbers, outside the Lua of a
.menufile, or where a name
is declared (afterlocal,function,for,goto,::, in their name lists and in
parameter lists).io,os,package(require) andcoroutineare never offered. - Each item has the hover's code line as
detail; the manual text or EEex-Docs link is added
when the item is resolved, in Markdown or plain text as the client prefers
(completionItem.documentationFormat). The edit range is the name around the cursor, sent
once per list when the client supportsitemDefaults.editRange, as an insert/replace edit
when it supportsinsertReplaceSupport.
- Variables: the locals visible at the cursor (the innermost of each name, the implicit
- Semantic tokens (
textDocument/semanticTokens/full,/full/deltaand/range) for the names
in the Lua of.luaand.menufiles, classified by the rules of hover so that a name is
colored as it hovers. Keywords, literals, comments and.menusyntax are left to the TextMate
grammars.- Types (all standard):
namespace,function,method,variable,parameter,property,
label. Modifiers:declaration,modification,defaultLibrary, andglobal, declared
in the manifest (contributes.semanticTokenModifiers) so that themes can style*.global.
No TextMate fallback scope is contributed: there is no conventional scope for globals, and
the predefined fallbacks of the token types still apply. - Locals: parameters and the implicit
selfareparameter;local function f, and a local
declared with a function expression and never assigned again, arefunction. - Globals have
global. A global the document assigns is afunctionorvariablefrom its
first assignment; otherwise it takes its kind from the Lua 5.2 manual (namespacefor the
module tables) or EEex-Docs.defaultLibrarymarks the manual's names, the engine'sprint
and the EE Game Lua Functions, not EEex functions._ENV, and names resolved through a
local_ENV, are not globals. - Fields are
property, ormethodafter:; library and EEex-Docs members (string.format,
C:AddGold) as documented. Assignment targets havemodification, declared names
declaration, labels arelabel.
- Types (all standard):
- Formatting of
.luafiles (textDocument/formatting,/rangeFormattingand
/onTypeFormatting), layout-preserving: only the white space between tokens and comments
changes..menufiles are not formatted (no formatter is offered for them).- Line breaks are kept exactly as written; strings, long strings and long comments are never
touched. Trailing white space is removed (also after a--comment) and blank lines are
emptied. - Indentation by the constructs open at the start of each line (
function,do,then,
else,repeat,(,[,{), counted once per line that opens them (f(function()indents
its body once); a line that starts withend,until,else,elseif,),]or}is
indented like the line that opened the construct; a line that continues a statement gets one
more level. One level is a tab, ortabSizespaces withinsertSpaces; atabSizethat is
not an integer from 1 to 100 (the bounds of VS Code'seditor.tabSize) is refused and logged. - Spacing within a line: one space around binary operators,
=and keywords and after,/;;
none inside()/[], around./:, after unary-/#or before the parentheses of a call
or function;{ a }and{}; string and table call arguments (f"x",f{…}) stay joined or
apart as written; the space before a trailing comment is kept. insertFinalNewlineandtrimFinalNewlinesare honored for document formatting when the
client sendstrue. No new settings.- A file with a syntax error is not formatted (the reason is logged); range and on-type
formatting only refuse errors before the end of the lines they change. - On-type: after a line break the finished line is formatted (a blank new line keeps the
editor's indentation); after the last character ofend,else,elseif,until,),
]or}that starts a line, the line is re-indented. VS Code needseditor.formatOnType. - Every result is lexed again and must have the same tokens and comments, or nothing changes.
- Registered dynamically for Lua documents only (language
lua, or*.luain any letter case)
when the client supports it, so.menufiles have no formatter; static otherwise.
- Line breaks are kept exactly as written; strings, long strings and long comments are never
- Quick fixes (
textDocument/codeAction) for three.menudiagnostics, with the remedy
IESDP states:menu-unquoted-underscore: Enclose in quotes (My_Menu→"My_Menu"; "Always quote
names"). A run without a letter (10_0) gets no fix: it is not a name, and quoting would
make a number a string.menu-word-too-long: Enclose in quotes ("Quoted strings are not limited"); the whole run
when the word is joined to_.menu-inline-lua-last-character: Insert a space before the closing backtick ("end every
inline block with a line break or a space"), so the engine drops the space instead of code.- Each fix is preferred (
isPreferred) and linked to its diagnostic; when the file has several
problems of the code, Fix all<code>problems fixes them together. source.fixAll.ieLuaapplies every fix of the file, also fromeditor.codeActionsOnSave
({ "source.fixAll.ieLua": "explicit" }) and whether or not diagnostics were published
(ieLua.validate.modemanual). The kind is stable: settings refer to it.- No fix for
lua-syntax,menu-unterminated-stringormenu-unterminated-block: where the
text should end, or how to repair the Lua, would be a guess. - The current text is analyzed again for every request: a diagnostic from an older version of
the file (published on save, before later edits) gets no fix rather than an edit in the wrong
place. Every set of edits is checked by lexing the result: the remaining problems must be
exactly those no fix touches, or nothing is offered (and an error is logged). - The fixes change the Lua the engine compiles, as intended: the character it dropped before
the backtick now runs, and a quoted property value is compiled whole (enabled "My_Var"is
My_Var, notMy). The Lua is validated as usual afterwards; it may report an error the
dropped or split text hid. - Titles are localized like the hover labels. Advertised only to clients that accept
CodeActionliterals (codeActionLiteralSupport).
- LuaCATS doc comments (annotation reference) on the
document's own code, in hover, completion and diagnostics. Types are shown as written; nothing checks or infers them.- A doc block is a run of
---comments, each alone on its line, on consecutive lines; it
documents the statement that starts on the next line. A blank line detaches it, and----
banners and---after code are not doc comments. The reference does not state this rule;
its examples follow it. The same applies inside the Lua of.menufiles. - Documented:
local function f,local x = …(one name),function G()andG = …(one
name), a global by the block above its first assignment, as its hover code line already is.
Each parameter shows its own@paramentry, also forfunction M.f(a),function M:m(a)
andM.f = function(a) … end, whose names have no hover. - Rendered: the description (Markdown, one leading space removed from each line), then
@param,@return,@type,@deprecatedand@seein the order written, laid out as VS
Code's own TypeScript hovers lay out JSDoc tags (*@param* `name` — text), with the type in
a code span after the name. The other reference tags (@class,@field,@overload, …) and
---|lines are not rendered and never show up as description. Tags are---@tag, as the
reference writes them;--- @tagstays description text. - The code line of the hover, and the
detailof a completion item, do not change. - Completion items of documented names carry the same text as their hover in
documentation,
sent with the list rather than oncompletionItem/resolve: the resolve request names no
document, so a later lookup could read a newer version of it. - Diagnostics (warnings, published with the others under
ieLua.validate.mode; codes are
stable):doc-tag-malformedfor---@paramwithout a name or type and---@returnor
---@typewithout a type, in any doc block;doc-param-unknownfor a---@paramthe
documented function does not have (...needs a vararg function,selfa method), checked
only where the statement writes the function itself, never for a call result; and
doc-param-duplicatefor a parameter documented twice. Messages are localized like the hover
labels.
- A doc block is a run of
- Error-tolerant Lua 5.2 parser and scope analysis (
src/server/syntax/), checked against the
official compiler by a differential test; it publishes no diagnostics of its own. - Localization of the manifest, UI strings and the language server's hover labels into all 14 VS
Code display languages (machine-produced; review welcome). - Setup guides for Sublime Text, Neovim, Emacs, JetBrains IDEs, Helix, Zed, Kate, Notepad++ and Geany.
- EEex documentation index (
data/eeex/): names and deep links only, synced from the published
Read the Docs build. - Repository tooling: CI, CodeQL, commit linting, Dependabot with auto-merge, release automation,
EEex docs sync, issue and pull request templates.
Changed
- The extension also activates in workspaces that contain
.luaor.menufiles, in any letter
case (workspaceContains:**/*.[lL][uU][aA],workspaceContains:**/*.[mM][eE][nN][uU]), so
Go to Symbol in Workspace works before any file is opened. - Minimum VS Code version is 1.91.0 (required by
vscode-languageclient10 and later). - Versioning starts at 1.0.0: when no release exists yet, the Release workflow ships the
committedVERSIONas the first stable release (a pre-release before it would be 1.1.0). - The Release workflow publishes only for merged
chore(release): …pull requests, not for any
other push that changesVERSION. - The Release workflow records the installed size of each release for the README's install-size
badge (.github/badges/install-size.json, a shields.io endpoint): the size VS Code shows in the
extension's details, computed from the VSIX exactly as VS Code installs it
(scripts/release/vsix.mts). CI checks it on release branches and the publish job against the
VSIX it publishes; the exact byte count goes in the release notes. - GitHub releases have the VSIX as their only asset; its SHA-256 moved from a separate
.vsix.sha256file into the release notes, so the download count covers VSIX downloads only. - CI integration jobs build the tests before running them, and a test run that finds no tests now
fails. Until now the CI integration jobs ran 0 tests and passed.
Security
Development tooling only; the extension's bundles are unchanged.
@azure/msal-node(used by@vscode/vscethrough@azure/identity) is 7.2.0, fixing
GHSA-xcx6-jx8p-x3h5.serialize-javascriptin@vscode/test-cli's mocha 11 is forced to 7.x with an npm override,
fixing GHSA-5c6j-r48x-rmvq,
GHSA-qj8w-gfj5-8c6v and
GHSA-m5mm-p8h7-m29v. See CONTRIBUTING.md › Setup
for when to remove it.- The EEex docs sync script (
scripts/eeex-docs/sync.mts) validates everything it fetches
before using it: commits must be full SHAs, and every entry must be an identifier with a deep
link inside the EEex documentation. Otherwise it stops without writing. It also reads the
existing data file without a separate existence check (CodeQLjs/file-system-race).
SHA-256 of ie-lua-language-server-1.0.0.vsix: 6dfb73acf9b0cd0b788896731fb5810df345a5194080d819ed9df7b0769fa0bd
Installed size: 1275111 bytes (1.22MB in VS Code).