@@ -65,6 +65,37 @@
6565(function_capture module: (atom) @namespace)
6666(function_capture function: (atom) @function)
6767
68+; Ignored variables
69+((variable) @comment.discard
70+ (#match? @comment.discard "^_"))
71+
72+; Parameters
73+; specs
74+((attribute
75+ name: (atom) @keyword
76+ (stab_clause
77+ pattern: (arguments (variable) @variable.parameter)
78+ body: (variable)? @variable.parameter))
79+ (#match? @keyword "(spec|callback)"))
80+; functions
81+(function_clause pattern: (arguments (variable) @variable.parameter))
82+; anonymous functions
83+(stab_clause pattern: (arguments (variable) @variable.parameter))
84+; parametric types
85+((attribute
86+ name: (atom) @keyword
87+ (arguments
88+ (binary_operator
89+ left: (call (arguments (variable) @variable.parameter))
90+ operator: "::")))
91+ (#match? @keyword "(type|opaque)"))
92+; macros
93+((attribute
94+ name: (atom) @keyword
95+ (arguments
96+ (call (arguments (variable) @variable.parameter))))
97+ (#eq? @keyword "define"))
98+
6899; Records
69100(record_content
70101 (binary_operator
@@ -105,9 +136,6 @@
105136 name: (_) @keyword.directive)
106137
107138; Comments
108−((variable) @comment.discard
109− (#match? @comment.discard "^_"))
110−
111139(tripledot) @comment.discard
112140
113141[(comment) (line_comment) (shebang)] @comment