From 58940a558986a640623bf42ad48273576d14b613 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Sun, 20 Nov 2022 14:41:51 +0200 Subject: [PATCH] highlights(julia): use more specific groups --- queries/julia/highlights.scm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm index 8d30ff558..116767870 100644 --- a/queries/julia/highlights.scm +++ b/queries/julia/highlights.scm @@ -79,9 +79,11 @@ ;; Definitions (abstract_definition - name: (identifier) @type) + name: (identifier) @type.definition + (subtype_clause (identifier) @type)) (primitive_definition - name: (identifier) @type) + name: (identifier) @type.definition + (subtype_clause (identifier) @type)) (struct_definition name: (identifier) @type) @@ -107,19 +109,16 @@ ;;; Keywords [ - "abstract" - "const" "macro" - "primitive" "struct" "type" - "mutable" "where" ] @keyword "end" @keyword -((identifier) @keyword (#any-of? @keyword "global" "local")) ; Grammar error +((identifier) @keyword + (#any-of? @keyword "global" "local")) ; Grammar error (compound_statement ["begin" "end"] @keyword) @@ -174,6 +173,13 @@ (return_statement "return" @keyword.return) +[ + "abstract" + "const" + "mutable" + "primitive" +] @type.qualifier + ;;; Operators & Punctuation