From 9e80738f3073e6dc95ebefee60526c7c1499d7d2 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 28 Jul 2024 12:13:10 +0200 Subject: [PATCH] fix(runtime): sync bundled treesitter queries --- runtime/queries/c/highlights.scm | 2 +- runtime/queries/markdown/highlights.scm | 6 +++--- runtime/queries/markdown_inline/highlights.scm | 6 +++--- runtime/queries/query/highlights.scm | 11 ++++++++++- runtime/queries/vimdoc/highlights.scm | 5 +++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm index 170937c8f8..eba272d5c9 100644 --- a/runtime/queries/c/highlights.scm +++ b/runtime/queries/c/highlights.scm @@ -1,6 +1,6 @@ ; Lower priority to prefer @variable.parameter when identifier appears in parameter_declaration. ((identifier) @variable - (#set! "priority" 95)) + (#set! priority 95)) (preproc_def (preproc_arg) @variable) diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm index a9ce4df200..a12669ca2b 100644 --- a/runtime/queries/markdown/highlights.scm +++ b/runtime/queries/markdown/highlights.scm @@ -45,7 +45,7 @@ (indented_code_block) @markup.raw.block ((fenced_code_block) @markup.raw.block - (#set! "priority" 90)) + (#set! priority 90)) (fenced_code_block (fenced_code_block_delimiter) @markup.raw.block @@ -103,13 +103,13 @@ (task_list_marker_checked) @markup.list.checked ((block_quote) @markup.quote - (#set! "priority" 90)) + (#set! priority 90)) ([ (plus_metadata) (minus_metadata) ] @keyword.directive - (#set! "priority" 90)) + (#set! priority 90)) [ (block_continuation) diff --git a/runtime/queries/markdown_inline/highlights.scm b/runtime/queries/markdown_inline/highlights.scm index ac99cce5fc..bfbcf1c620 100644 --- a/runtime/queries/markdown_inline/highlights.scm +++ b/runtime/queries/markdown_inline/highlights.scm @@ -43,7 +43,7 @@ (inline_link (link_text) @_label (link_destination) @_url - (#set! @_label "url" @_url)) + (#set! @_label url @_url)) ; Conceal image links (image @@ -89,11 +89,11 @@ ] @markup.link.url @nospell ((link_destination) @_url - (#set! @_url "url" @_url)) + (#set! @_url url @_url)) ((uri_autolink) @_url (#offset! @_url 0 1 0 -1) - (#set! @_url "url" @_url)) + (#set! @_url url @_url)) (entity_reference) @nospell diff --git a/runtime/queries/query/highlights.scm b/runtime/queries/query/highlights.scm index c02ee3f2a0..6fb23ac6d1 100644 --- a/runtime/queries/query/highlights.scm +++ b/runtime/queries/query/highlights.scm @@ -12,7 +12,7 @@ name: (identifier) @variable) (field_definition - name: (identifier) @property) + name: (identifier) @variable.member) (negated_field "!" @operator @@ -63,6 +63,15 @@ ((comment) @keyword.directive @nospell (#lua-match? @keyword.directive "^;+%s*format%-ignore%s*$")) +((predicate + name: (identifier) @_name + parameters: (parameters + . + (capture)? + . + (identifier) @property)) + (#eq? @_name "set")) + ((predicate name: (identifier) @_name parameters: (parameters diff --git a/runtime/queries/vimdoc/highlights.scm b/runtime/queries/vimdoc/highlights.scm index 194c80362c..829a643ae8 100644 --- a/runtime/queries/vimdoc/highlights.scm +++ b/runtime/queries/vimdoc/highlights.scm @@ -41,7 +41,7 @@ text: (_) @markup.raw) ((codeblock) @markup.raw.block - (#set! "priority" 90)) + (#set! priority 90)) (codeblock ">" @markup.raw @@ -59,7 +59,8 @@ (keycode) @string.special -(url) @string.special.url +((url) @string.special.url + (#set! @string.special.url url @string.special.url)) (modeline) @keyword.directive