mirror of
https://github.com/zeronsh/comet.git
synced 2026-11-16 18:57:19 +00:00
`.luau` files and ```luau fences now highlight with the official tree-sitter-luau grammar (tree-sitter-grammars, pinned at 1.2.0), and Luau files get their icon wherever a language resolves one. The upstream query targets Neovim, and several patterns misfire under tree-sitter-highlight; each is rewritten against its exact upstream text, so a grammar bump that changes one fails the tests instead of drifting: - `#lua-match?` isn't evaluated by the Rust runtime (every identifier matched the type and constant patterns): rewritten to `#match?`. - `(comment) @comment @spell`: the unmapped second capture took the comment's highlight. - `(type (identifier))`: `type` is a supertype that includes `identifier`, so it matched every name. Types are matched where they sit instead — after an annotation's `:`, a cast's `::`, an alias's `=`, or inside a composite type. - Table-type keys and function-type parameters are only the names before a `:` (the grammar doesn't parse named function-type parameters at all). Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| queries/kotlin | ||
| src | ||
| tests | ||
| Cargo.toml | ||