Is there a Lua 5.4 Syntax extension for VS Code?

Lua support in editors is spotty all around; the best overall experience I’ve had so far has been in Visual Studio Code with lua-language-server, Lua Plus, and vscode-lua, which in combination mostly work pretty well, particularly for my cross-platform Mac and Windows team.

However, I can only select syntax versions 5.1, 5.2, and 5.3. This means mostly that I can’t use <const> without showing syntax errors, even if it compiles okay on the Playdate. I’ve looked all over but can’t find a 5.4 syntax; several of the aforementioned extensions say they support 5.4, but Code itself can’t.

Anybody know of one?

I believe Lua 5.4 has only just made it to release candidate, which may be the reason.

Dash only just added the docset for 5.4 even though it was requested many months ago when 5.4 was in beta state.

That said, are there that many things new in 5.4 that don’t get highlighted? What are you missing? Could you add them manually for now?

1 Like

I’ve never modified a syntax highlighter before! The nicest things would be to add local <const> from 5.4, and then maybe += and -= from the Playdate convenience features.