Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polychromatist/tree-sitter-luau
tree-sitter for luau
https://github.com/polychromatist/tree-sitter-luau
helix-editor luau nvim tree-sitter
Last synced: 16 days ago
JSON representation
tree-sitter for luau
- Host: GitHub
- URL: https://github.com/polychromatist/tree-sitter-luau
- Owner: polychromatist
- License: mit
- Created: 2022-10-11T17:38:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T03:05:50.000Z (17 days ago)
- Last Synced: 2024-10-28T05:14:35.376Z (16 days ago)
- Topics: helix-editor, luau, nvim, tree-sitter
- Language: Scheme
- Homepage:
- Size: 6.83 MB
- Stars: 17
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## tree-sitter-luau
Luau grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter)
### Enabling Highlighting Queries for [Helix Editor](https://github.com/helix-editor/helix)
1. Find the user `languages.toml` file [docs](https://docs.helix-editor.com/languages.html)
- Linux and Mac: `~/.config/helix`
- Windows: `%appdata%\helix`, _not_ localappdata
2. Append two entries inside `languages.toml`:
```toml
[[language]]
name = "luau"
scope = "source.luau"
injection-regex = "^luau$"
file-types = ["luau"]
comment-tokens = ["--", "---"]
block-comment-tokens = [
{start = "--[[", end = "]]"},
{start = "--[=[", end = "]=]"},
{start = "--[==[", end = "]==]"}
]
indent = { tab-width = 2, unit = " "}
roots = [ "aftman.toml", "default.project.json", "wally.toml", "rokit.toml", "selene.toml", ".darklua.json", "foreman.toml", ".luaurc" ][[grammar]]
name = "luau"
source = { git = "https://github.com/polychromatist/tree-sitter-luau", rev = "d57b5420002e38de704ee415625f2f012eb97dc2" }
```
3. Run `.\scripts\clone_helix_queries.ps1` (or manually clone from `.\helix-queries\` into `\runtime\queries\luau`)
4. Run `hx -g fetch` and `hx -g build`