on master help sign in
feat(lang): Add esdl grammar (#3526)
2b16fd4Jaden
book/src/generated/lang-support.md+1
@@ -24,6 +24,7 @@
24| elvish | ✓ | | | `elvish` |
24| elvish | ✓ | | | `elvish` |
25| erb | ✓ | | | |
25| erb | ✓ | | | |
26| erlang | ✓ | ✓ | | `erlang_ls` |
26| erlang | ✓ | ✓ | | `erlang_ls` |
27+| esdl | ✓ | | | |
27| fish | ✓ | ✓ | ✓ | |
28| fish | ✓ | ✓ | ✓ | |
28| fortran | ✓ | | ✓ | `fortls` |
29| fortran | ✓ | | ✓ | `fortls` |
29| gdscript | ✓ | | ✓ | |
30| gdscript | ✓ | | ✓ | |
languages.toml+13
@@ -1664,3 +1664,16 @@ indent = { tab-width = 4, unit = " " }
1664[[grammar]]
1664[[grammar]]
1665name = "xit"
1665name = "xit"
1666source = { git = "https://github.com/synaptiko/tree-sitter-xit", rev = "7d7902456061bc2ad21c64c44054f67b5515734c" }
1666source = { git = "https://github.com/synaptiko/tree-sitter-xit", rev = "7d7902456061bc2ad21c64c44054f67b5515734c" }
1667+
1668+[[language]]
1669+name = "esdl"
1670+scope = "source.esdl"
1671+injection-regex = "esdl"
1672+file-types = ["esdl"]
1673+comment-token = "#"
1674+indent = { tab-width = 2, unit = " " }
1675+roots = ["edgedb.toml"]
1676+
1677+[[grammar]]
1678+name ="esdl"
1679+source = { git = "https://github.com/greym0uth/tree-sitter-esdl", rev = "b840c8a8028127e0a7c6e6c45141adade2bd75cf" }
runtime/queries/esdl/highlights.scmnew file+74
@@ -0,0 +1,74 @@
1+; Keywords
2+[
3+ "module"
4+ "using"
5+ "single"
6+ "multi"
7+ "link"
8+ "property"
9+ "constraint"
10+ "tuple"
11+ "annotation"
12+ "abstract"
13+ "scalar"
14+ "type"
15+ "required"
16+ "optional"
17+ "extension"
18+ "function"
19+] @keyword
20+
21+(modifier) @keyword
22+(extending) @keyword
23+
24+(module name: (identifier) @namespace)
25+(object_type) @type
26+
27+(comment) @comment
28+
29+; Properties
30+(property) @variable.other.member
31+(link) @variable.other.member
32+(annotation) @variable.other.member
33+
34+(identifier) @variable
35+(string) @string
36+(edgeql_fragment) @string
37+; Builtins
38+
39+(type) @type
40+[
41+ "str"
42+ "bool"
43+ "int16"
44+ "int32"
45+ "int64"
46+ "float32"
47+ "float64"
48+ "bigint"
49+ "decimal"
50+ "json"
51+ "uuid"
52+ "bytes"
53+ "datetime"
54+ "duration"
55+ "sequence"
56+ "anytype"
57+] @type.builtin
58+
59+(true) @constant.builtin
60+(false) @constant.builtin
61+(null) @constant.builtin
62+
63+; Delimiters
64+[
65+ ";"
66+ ","
67+] @punctuation.delimiter
68+
69+; Operators
70+[
71+ "->"
72+ ":="
73+] @operator
74+