mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
highlights(markup): distinguish heading level in queries
also add a few queries from Helix and remove controversial code block conceal in Markdown
This commit is contained in:
parent
15300c1a10
commit
680807fa6a
5 changed files with 43 additions and 53 deletions
|
|
@ -126,48 +126,48 @@
|
|||
;; Sectioning
|
||||
(title_declaration
|
||||
command: _ @namespace
|
||||
options: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
options: (brack_group (_) @text.title.1)?
|
||||
text: (curly_group (_) @text.title.1))
|
||||
|
||||
(author_declaration
|
||||
command: _ @namespace
|
||||
authors: (curly_group_author_list
|
||||
((author)+ @text.title)))
|
||||
((author)+ @text.title.1)))
|
||||
|
||||
(chapter
|
||||
command: _ @namespace
|
||||
toc: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
toc: (brack_group (_) @text.title.2)?
|
||||
text: (curly_group (_) @text.title.2))
|
||||
|
||||
(part
|
||||
command: _ @namespace
|
||||
toc: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
toc: (brack_group (_) @text.title.2)?
|
||||
text: (curly_group (_) @text.title.2))
|
||||
|
||||
(section
|
||||
command: _ @namespace
|
||||
toc: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
toc: (brack_group (_) @text.title.3)?
|
||||
text: (curly_group (_) @text.title.3))
|
||||
|
||||
(subsection
|
||||
command: _ @namespace
|
||||
toc: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
toc: (brack_group (_) @text.title.4)?
|
||||
text: (curly_group (_) @text.title.4))
|
||||
|
||||
(subsubsection
|
||||
command: _ @namespace
|
||||
toc: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
toc: (brack_group (_) @text.title.5)?
|
||||
text: (curly_group (_) @text.title.5))
|
||||
|
||||
(paragraph
|
||||
command: _ @namespace
|
||||
toc: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
toc: (brack_group (_) @text.title.6)?
|
||||
text: (curly_group (_) @text.title.6))
|
||||
|
||||
(subparagraph
|
||||
command: _ @namespace
|
||||
toc: (brack_group (_) @text.title)?
|
||||
text: (curly_group (_) @text.title))
|
||||
toc: (brack_group (_) @text.title.6)?
|
||||
text: (curly_group (_) @text.title.6))
|
||||
|
||||
;; Beamer frames
|
||||
(generic_environment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue