From a034c7aa25a2dca0ab2c0b82d8e325f248d52e74 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 5 Jun 2023 14:09:44 +0200 Subject: fix(highlights): lower priority for codeblocks with injections (#4905) --- queries/c/highlights.scm | 6 ++---- queries/markdown/highlights.scm | 8 +++----- queries/vimdoc/highlights.scm | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'queries') diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm index 523a79240..b5dad2ae2 100644 --- a/queries/c/highlights.scm +++ b/queries/c/highlights.scm @@ -112,10 +112,8 @@ (number_literal) @number (char_literal) @character -[ - (preproc_arg) - (preproc_defined) -] @function.macro +((preproc_arg) @function.macro (#set! "priority" 90)) +(preproc_defined) @function.macro (((field_expression (field_identifier) @property)) @_parent diff --git a/queries/markdown/highlights.scm b/queries/markdown/highlights.scm index 8867a4b7f..e78d233cc 100644 --- a/queries/markdown/highlights.scm +++ b/queries/markdown/highlights.scm @@ -9,11 +9,9 @@ (atx_heading (atx_h5_marker) @text.title.5.marker (inline) @text.title.5) (atx_heading (atx_h6_marker) @text.title.6.marker (inline) @text.title.6) -[ - (link_title) - (indented_code_block) - (fenced_code_block) -] @text.literal +(link_title) @text.literal +(indented_code_block) @text.literal.block +((fenced_code_block) @text.literal.block (#set! "priority" 90)) (info_string) @label diff --git a/queries/vimdoc/highlights.scm b/queries/vimdoc/highlights.scm index e0dce49b2..c52333df1 100644 --- a/queries/vimdoc/highlights.scm +++ b/queries/vimdoc/highlights.scm @@ -15,7 +15,7 @@ (codespan "`" @conceal (#set! conceal "") text: (_) @text.literal) -(codeblock) @text.literal +((codeblock) @text.literal.block (#set! "priority" 90)) (codeblock [">" (language)] @conceal (#set! conceal "")) (block -- cgit v1.2.3-70-g09d2