Luau grammar for tree-sitter
Enabling Highlighting Queries for Helix Editor
- Find the user
languages.toml
file docs
- Linux and Mac:
~/.config/helix
- Windows:
%AppData%\helix
- Append two entries inside
languages.toml
:
[[language]]
name = "luau"
scope = "source.luau"
injection-regex = "^luau$"
file-types = ["luau"]
comment-token = "--"
indent = { tab-width = 2, unit = " "}
# language-server = { command = "luau-lsp", args = ["lsp", "--definitions=<path-to-robloxTypes.d.lua>"] }
roots = [ "aftman.toml", "default.project.json", "wally.toml" ]
[[grammar]]
name = "luau"
source = { git = "https://github.com/polychromatist/tree-sitter-luau" }
- Run
.\scripts\clone_helix_queries.ps1
(or manually clone from.\helix-queries\
into<helix-config>\runtime\queries\luau
) - Run
hx --grammar fetch
andhx --grammar build