queries: Fix `comment.unused` highlights in Erlang

* Other languages use `comment.unused` instead of `comment.discard`.
* Fix the precedence of discarded variables - previously the parameter
  highlight was higher precedence so discarded variables in the
  parameter list were highlighted as parameters instead of
  `comment.unused`.
pull/13460/head
Michael Davis 2025-05-02 09:45:21 -04:00
parent aa3fad84ef
commit 12139a4c30
No known key found for this signature in database
1 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
; Comments
(tripledot) @comment.discard
(tripledot) @comment.unused
[(comment) (line_comment) (shebang)] @comment
@ -114,10 +114,6 @@
] @comment.block.documentation)
(#any-of? @keyword "doc" "moduledoc"))
; Ignored variables
((variable) @comment.discard
(#match? @comment.discard "^_"))
; Macros
(macro
"?"+ @keyword.directive
@ -163,3 +159,7 @@
(record field: (atom) @variable.other.member)
(record name: (atom) @type)
; Ignored variables
((variable) @comment.unused
(#match? @comment.unused "^_"))