on master help sign in
Update tree-sitters Erlang and HEEx (#2149)
commitad36a024da4dae0cc096cae8ab83740507bc8d8a authorMichael Davis <mcarsondavis@gmail.com> dateSun 17 Apr 2022, 12:46 (5 years ago) parentc45fb08
3 files changed+16−16
languages.toml+1−1 runtime/queries/erlang/highlights.scm+13−13 runtime/queries/heex/highlights.scm+2−2
languages.toml+1−1
@@ -974,7 +974,7 @@ language-server = { command = "erlang_ls" }
974974
975975[[grammar]]
976976name = "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" }
978978
979979[[language]]
980980name = "kotlin"
runtime/queries/erlang/highlights.scm+13−13
@@ -46,10 +46,16 @@
4646 ])
4747 (#eq? @keyword "define"))
4848
49+(attribute
50+ name: (atom) @keyword
51+ (arguments
52+ (_) @keyword.directive)
53+ (#match? @keyword "ifn?def"))
54+
4955(attribute
5056 name: (atom) @keyword
5157 module: (atom) @module
52− (#eq? @keyword "spec"))
58+ (#eq? @keyword "(spec|callback)"))
5359
5460; Functions
5561(function name: (atom) @function)
@@ -69,10 +75,7 @@
6975(record name: (atom) @type)
7076
7177; Keywords
72−((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)$"))
78+(attribute name: (atom) @keyword)
7679
7780["case" "fun" "if" "of" "when" "end" "receive" "try" "catch" "after" "begin" "maybe"] @keyword
7881
@@ -86,10 +89,6 @@
8689(unary_operator operator: _ @operator)
8790["/" ":" "#" "->"] @operator
8891
89−; Comments
90−((variable) @comment.discard
91− (#match? @comment.discard "^_"))
92−
9392(tripledot) @comment.discard
9493
9594(comment) @comment
@@ -99,12 +98,13 @@
9998 "?"+ @keyword.directive
10099 name: (_) @keyword.directive)
101100
101+; Comments
102+((variable) @comment.discard
103+ (#match? @comment.discard "^_"))
104+
102105; Basic types
103106(variable) @variable
104−[
105− (atom)
106− (quoted_atom)
107−] @string.special.symbol
107+(atom) @string.special.symbol
108108(string) @string
109109(character) @constant.character
110110
runtime/queries/heex/highlights.scm+2−2
@@ -11,8 +11,6 @@
1111 "--%>"
1212 "-->"
1313 "/>"
14− "{"
15− "}"
1614 ; These could be `@keyword`s but the closing `>` wouldn't be highlighted
1715 ; as `@keyword`
1816 "<:"
@@ -21,6 +19,8 @@
2119
2220; Non-comment or tag delimiters
2321[
22+ "{"
23+ "}"
2424 "<%"
2525 "<%="
2626 "<%%="