From 67b555c381b267db4cc6fba38a0cbf8b3dcb7448 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 3 Jun 2022 19:58:16 +0200 Subject: [PATCH] Move 'misc' high-lighting to end of file Turns out that order *matters* for queries. Tree-sitter will stop at the first match it seems. So I want the hyper-general 'identifier' matching right at the end to avoid overriding more specific rules. --- queries/highlights.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index 5044058..be0dfd5 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -1,11 +1,3 @@ -; Misc {{{ -(comment) @comment - -(type_identifier) @type -(field_identifier) @property -(identifier) @variable -; }}} - ; Keywords {{{ [ "array" @@ -56,4 +48,12 @@ ] @punctuation.bracket ; }}} +; Misc {{{ +(comment) @comment + +(type_identifier) @type +(field_identifier) @property +(identifier) @variable +; }}} + ; vim: sw=2 foldmethod=marker