mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
fix(highlights): lower priority for codeblocks with injections (#4905)
This commit is contained in:
parent
2d6e73ab2f
commit
a034c7aa25
4 changed files with 19 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue