mirror of https://github.com/helix-editor/helix
syntax: add grammar and highlighting for the alloy config lang (#13660)
parent
8d2870b94a
commit
d375f1e7f4
|
@ -3,6 +3,7 @@
|
|||
| ada | ✓ | ✓ | | `ada_language_server` |
|
||||
| adl | ✓ | ✓ | ✓ | |
|
||||
| agda | ✓ | | | |
|
||||
| alloy | ✓ | | | |
|
||||
| amber | ✓ | | | |
|
||||
| astro | ✓ | | | `astro-ls` |
|
||||
| awk | ✓ | ✓ | | `awk-language-server` |
|
||||
|
|
|
@ -4390,3 +4390,15 @@ language-servers = [ "clarinet" ]
|
|||
name = "clarity"
|
||||
source = { git = "https://github.com/xlittlerag/tree-sitter-clarity", rev = "7fa54825fdd971a1a676f885384f024fe2b7384a" }
|
||||
|
||||
[[language]]
|
||||
name = "alloy"
|
||||
scope = "source.alloy"
|
||||
injection-regex = "alloy"
|
||||
file-types = ["alloy"]
|
||||
comment-token = "//"
|
||||
block-comment-tokens = { start = "/*", end = "*/" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[[grammar]]
|
||||
name = "alloy"
|
||||
source = { git = "https://github.com/mattsre/tree-sitter-alloy", rev = "3e18eb4e97f06c57a3925f3d20bef6329a6eaef3" }
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
; Literals
|
||||
; --------
|
||||
|
||||
(boolean) @constant.builtin.boolean
|
||||
(comment) @comment
|
||||
(string) @string
|
||||
(number) @constant.numeric
|
||||
(null) @constant.builtin
|
||||
|
||||
; Punctuation
|
||||
; -----------
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"."
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"="
|
||||
] @operator
|
||||
|
||||
; Function definitions
|
||||
;---------------------
|
||||
|
||||
(function
|
||||
name: (identifier) @function)
|
||||
|
||||
|
||||
(attribute (identifier) @variable.other.member)
|
||||
(block (identifier) @type.builtin)
|
Loading…
Reference in New Issue