on master help sign in
Update tree-sitters Erlang and HEEx (#2149)
ad36a02Michael Davis
languages.toml+1−1
@@ -974,7 +974,7 @@ language-server = { command = "erlang_ls" }
974
974
975[[grammar]]
975[[grammar]]
976name = "erlang"
976name = "erlang"
977−source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "1e81393b8f0a81b35ff1679a9420fafbd2cf3511" }
977+source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "3f611cfdc790214c3f9f9cf1658b3ae8039c54b8" }
978
978
979[[language]]
979[[language]]
980name = "kotlin"
980name = "kotlin"
runtime/queries/erlang/highlights.scm+13−13
@@ -46,10 +46,16 @@
46 ])
46 ])
47 (#eq? @keyword "define"))
47 (#eq? @keyword "define"))
48
48
49+(attribute
50+ name: (atom) @keyword
51+ (arguments
52+ (_) @keyword.directive)
53+ (#match? @keyword "ifn?def"))
54+
49(attribute
55(attribute
50 name: (atom) @keyword
56 name: (atom) @keyword
51 module: (atom) @module
57 module: (atom) @module
52− (#eq? @keyword "spec"))
58+ (#eq? @keyword "(spec|callback)"))
53
59
54; Functions
60; Functions
55(function name: (atom) @function)
61(function name: (atom) @function)
@@ -69,10 +75,7 @@
69(record name: (atom) @type)
75(record name: (atom) @type)
70
76
71; Keywords
77; Keywords
72−((attribute name: (atom) @keyword)
78+(attribute name: (atom) @keyword)
73− (#match?
74− @keyword
75− "^(define|export|export_type|include|include_lib|ifdef|ifndef|if|elif|else|endif|vsn|on_load|behaviour|record|file|type|opaque|spec)$"))
76
79
77["case" "fun" "if" "of" "when" "end" "receive" "try" "catch" "after" "begin" "maybe"] @keyword
80["case" "fun" "if" "of" "when" "end" "receive" "try" "catch" "after" "begin" "maybe"] @keyword
78
81
@@ -86,10 +89,6 @@
86(unary_operator operator: _ @operator)
89(unary_operator operator: _ @operator)
87["/" ":" "#" "->"] @operator
90["/" ":" "#" "->"] @operator
88
91
89−; Comments
90−((variable) @comment.discard
91− (#match? @comment.discard "^_"))
92−
93(tripledot) @comment.discard
92(tripledot) @comment.discard
94
93
95(comment) @comment
94(comment) @comment
@@ -99,12 +98,13 @@
99 "?"+ @keyword.directive
98 "?"+ @keyword.directive
100 name: (_) @keyword.directive)
99 name: (_) @keyword.directive)
101
100
101+; Comments
102+((variable) @comment.discard
103+ (#match? @comment.discard "^_"))
104+
102; Basic types
105; Basic types
103(variable) @variable
106(variable) @variable
104−[
105− (atom)
106− (quoted_atom)
107−] @string.special.symbol
107+(atom) @string.special.symbol
108(string) @string
108(string) @string
109(character) @constant.character
109(character) @constant.character
110
110
runtime/queries/heex/highlights.scm+2−2
@@ -11,8 +11,6 @@
11 "--%>"
11 "--%>"
12 "-->"
12 "-->"
13 "/>"
13 "/>"
14− "{"
15− "}"
16 ; These could be `@keyword`s but the closing `>` wouldn't be highlighted
14 ; These could be `@keyword`s but the closing `>` wouldn't be highlighted
17 ; as `@keyword`
15 ; as `@keyword`
18 "<:"
16 "<:"
@@ -21,6 +19,8 @@
21
19
22; Non-comment or tag delimiters
20; Non-comment or tag delimiters
23[
21[
22+ "{"
23+ "}"
24 "<%"
24 "<%"
25 "<%="
25 "<%="
26 "<%%="
26 "<%%="