Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>LuaJIT 2.1 SyntaxNew to Visual Studio Code? Get it now.
LuaJIT 2.1 Syntax

LuaJIT 2.1 Syntax

EngineerSmith

|
1 install
| (0) | Free
Adds syntax highlighting for extra LuaJIT keywords and operators.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LuaJIT 2.1 Syntax Extension

Adds syntax highlighting for for LuaJIT's 2.1 keywords, operators, and numeric literals on top of VS Code's Lua support.

Issues & Pull Requests are welcome in the github repo.

Features

  • Keywords const, continue
  • Operators ??, ?., ternary (?/:), &&, ||, !, ~, &
  • Numeric Literals 0b..., underscore separators (1_000_000, 0xFF_80, 0b1010_1010), suffices (LL, ULL)
  • Library jit, bit, debug (matching math behaviour)

Compatibility

This extension adds regex rules on top of VS Code's existing Lua (source.lua) grammar rather than replacing it. Because it uses standard TextMate scopes, it works with existing Lua themes (exact color depends on your active theme).

Even if your LuaJIT version doesn't support every newer syntax feature or literal, other features like library highlighting (jit, etc.) can still be useful.

Built for the Löve community ♡, though it works across any Lua codebase.

Why no lambda highlighting?

-> already highlights as - and >, while |a, b| pipes are left unstyled rather than colored as operators (as they aren't operators and bracket matching scope behaviour isn't configured for them yet).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft