You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not yet very relevant, but parts of the syntax was already backported to v2.1: LuaJIT/LuaJIT#1476
LuaJIT uses a rolling release, which means this will slowly become a bigger problem. I believe most of the v3 features will not be backported, but these were due to it being required for LuaJIT development. I couldn't find any issues about it here, and it seems like the syntax isn't accepted in VSCode.
Here's a list of the currently backported extensions:
In addition, some style warnings I'd recommend:
Disallow missing spaces in ternaries with function calls for the default path (e.g. foo ? bar:baz() due to looking like a : function call
Opinionated: Disallow C-style logic operators (!, && and ||, maybe !=) for consistency and readability
Reacted by Alexandr Konichenko, Bruno Carvalho, vaisest, Changsheng Wu and Rhelvetican
In our private talks, we felt that the ternary operator's syntax would clash too heavily with Lua's method-call colon, making it less suitable for the current LuaLS parser implementation.
Additionally, since I have decided not to update emmyluacodestyle anymore, the associated formatting and style checking will no longer be supported. For formatting, please use emmylua_formatter.
Some things here should be quite easy to support, e.g. the &&, || which seem to already get recognized but for now just get a warning: Lua uses and /or
If you want to try it yourselves, the relevant syntax must pass this syntax test—it is not simply close to JavaScript syntax; there are considerable differences.
Activity
[-]LuaJIT updated syntax support backported to v2.1[/-][+]Support LuaJIT v3 syntax backported to v2.1[/+]Hedwig7s commentedon Jul 23, 2026
In addition, some style warnings I'd recommend:
Disallow missing spaces in ternaries with function calls for the default path (e.g.
foo ? bar:baz()due to looking like a : function callOpinionated: Disallow C-style logic operators (
!,&&and||, maybe!=) for consistency and readabilityCppCXY commentedon Jul 23, 2026
In our private talks, we felt that the ternary operator's syntax would clash too heavily with Lua's method-call colon, making it less suitable for the current LuaLS parser implementation.
Additionally, since I have decided not to update emmyluacodestyle anymore, the associated formatting and style checking will no longer be supported. For formatting, please use emmylua_formatter.
max397574 commentedon Jul 27, 2026
Some things here should be quite easy to support, e.g. the
&&,||which seem to already get recognized but for now just get a warning: Lua usesand/orvaisest commentedon Aug 4, 2026
Are there any updates to this? Is it already being implemented, or are contributions implementing parts of it welcome?
CppCXY commentedon Aug 5, 2026
If you want to try it yourselves, the relevant syntax must pass this syntax test—it is not simply close to JavaScript syntax; there are considerable differences.
luajit3_test.zip
vaisest commentedon Aug 29, 2026
This seems to have been implemented recently. Thanks for the quick update