Mercurial > forks > helix
changeset 6758:9766d2a1e3ad
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`.
author | Michael Davis <mcarsondavis@gmail.com> |
---|---|
date | Fri, 02 May 2025 09:45:21 -0400 |
parents | b14edc3dcf07 |
children | f939397387e8 |
files | runtime/queries/erlang/highlights.scm |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/queries/erlang/highlights.scm Thu May 01 13:54:45 2025 -0700 +++ b/runtime/queries/erlang/highlights.scm Fri May 02 09:45:21 2025 -0400 @@ -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 "^_"))