@@ -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