mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,9 +1,7 @@
|
|||
(
|
||||
[
|
||||
(fenced_code_block)
|
||||
(indented_code_block)
|
||||
(list)
|
||||
(section)
|
||||
] @fold
|
||||
(#trim! @fold)
|
||||
)
|
||||
([
|
||||
(fenced_code_block)
|
||||
(indented_code_block)
|
||||
(list)
|
||||
(section)
|
||||
] @fold
|
||||
(#trim! @fold))
|
||||
|
|
|
|||
|
|
@ -1,24 +1,53 @@
|
|||
;From MDeiml/tree-sitter-markdown & Helix
|
||||
(setext_heading (paragraph) @markup.heading.1 (setext_h1_underline) @markup.heading.1.marker)
|
||||
(setext_heading (paragraph) @markup.heading.2 (setext_h2_underline) @markup.heading.2.marker)
|
||||
(setext_heading
|
||||
(paragraph) @markup.heading.1
|
||||
(setext_h1_underline) @markup.heading.1.marker)
|
||||
|
||||
(atx_heading (atx_h1_marker) @markup.heading.1.marker (inline) @markup.heading.1)
|
||||
(atx_heading (atx_h2_marker) @markup.heading.2.marker (inline) @markup.heading.2)
|
||||
(atx_heading (atx_h3_marker) @markup.heading.3.marker (inline) @markup.heading.3)
|
||||
(atx_heading (atx_h4_marker) @markup.heading.4.marker (inline) @markup.heading.4)
|
||||
(atx_heading (atx_h5_marker) @markup.heading.5.marker (inline) @markup.heading.5)
|
||||
(atx_heading (atx_h6_marker) @markup.heading.6.marker (inline) @markup.heading.6)
|
||||
(setext_heading
|
||||
(paragraph) @markup.heading.2
|
||||
(setext_h2_underline) @markup.heading.2.marker)
|
||||
|
||||
(atx_heading
|
||||
(atx_h1_marker) @markup.heading.1.marker
|
||||
(inline) @markup.heading.1)
|
||||
|
||||
(atx_heading
|
||||
(atx_h2_marker) @markup.heading.2.marker
|
||||
(inline) @markup.heading.2)
|
||||
|
||||
(atx_heading
|
||||
(atx_h3_marker) @markup.heading.3.marker
|
||||
(inline) @markup.heading.3)
|
||||
|
||||
(atx_heading
|
||||
(atx_h4_marker) @markup.heading.4.marker
|
||||
(inline) @markup.heading.4)
|
||||
|
||||
(atx_heading
|
||||
(atx_h5_marker) @markup.heading.5.marker
|
||||
(inline) @markup.heading.5)
|
||||
|
||||
(atx_heading
|
||||
(atx_h6_marker) @markup.heading.6.marker
|
||||
(inline) @markup.heading.6)
|
||||
|
||||
(info_string) @label
|
||||
|
||||
(pipe_table_header (pipe_table_cell) @markup.heading)
|
||||
(pipe_table_header
|
||||
(pipe_table_cell) @markup.heading)
|
||||
|
||||
(pipe_table_header
|
||||
"|" @punctuation.special)
|
||||
|
||||
(pipe_table_row
|
||||
"|" @punctuation.special)
|
||||
|
||||
(pipe_table_delimiter_row
|
||||
"|" @punctuation.special)
|
||||
|
||||
(pipe_table_header "|" @punctuation.special)
|
||||
(pipe_table_row "|" @punctuation.special)
|
||||
(pipe_table_delimiter_row "|" @punctuation.special)
|
||||
(pipe_table_delimiter_cell) @punctuation.special
|
||||
|
||||
;; Code blocks (conceal backticks and language annotation)
|
||||
; Code blocks (conceal backticks and language annotation)
|
||||
(indented_code_block) @markup.raw.block
|
||||
|
||||
((fenced_code_block) @markup.raw.block
|
||||
|
|
@ -33,9 +62,7 @@
|
|||
(language) @conceal
|
||||
(#set! conceal "")))
|
||||
|
||||
[
|
||||
(link_destination)
|
||||
] @markup.link.url
|
||||
(link_destination) @markup.link.url
|
||||
|
||||
[
|
||||
(link_title)
|
||||
|
|
@ -71,23 +98,22 @@
|
|||
; @punctuation.special
|
||||
; (#eq? @punctuation.special "-")
|
||||
; (#set! conceal "—"))
|
||||
|
||||
(code_fence_content) @none
|
||||
|
||||
(thematic_break) @punctuation.special
|
||||
|
||||
(task_list_marker_unchecked) @markup.list.unchecked
|
||||
|
||||
(task_list_marker_checked) @markup.list.checked
|
||||
|
||||
((block_quote) @markup.quote (#set! "priority" 90))
|
||||
((block_quote) @markup.quote
|
||||
(#set! "priority" 90))
|
||||
|
||||
[
|
||||
(block_continuation)
|
||||
(block_quote_marker)
|
||||
] @punctuation.special
|
||||
|
||||
[
|
||||
(backslash_escape)
|
||||
] @string.escape
|
||||
(backslash_escape) @string.escape
|
||||
|
||||
(inline) @spell
|
||||
|
|
|
|||
|
|
@ -1,3 +1 @@
|
|||
[
|
||||
(list_item)
|
||||
] @indent.auto
|
||||
(list_item) @indent.auto
|
||||
|
|
|
|||
|
|
@ -4,23 +4,23 @@
|
|||
(code_fence_content) @injection.content
|
||||
(#set-lang-from-info-string! @_lang))
|
||||
|
||||
((html_block) @injection.content
|
||||
(#set! injection.language "html")
|
||||
(#set! injection.combined)
|
||||
(#set! injection.include-children))
|
||||
((html_block) @injection.content
|
||||
(#set! injection.language "html")
|
||||
(#set! injection.combined)
|
||||
(#set! injection.include-children))
|
||||
|
||||
((minus_metadata) @injection.content
|
||||
(#set! injection.language "yaml")
|
||||
(#offset! @injection.content 1 0 -1 0)
|
||||
(#set! injection.include-children))
|
||||
((minus_metadata) @injection.content
|
||||
(#set! injection.language "yaml")
|
||||
(#offset! @injection.content 1 0 -1 0)
|
||||
(#set! injection.include-children))
|
||||
|
||||
((plus_metadata) @injection.content
|
||||
(#set! injection.language "toml")
|
||||
(#offset! @injection.content 1 0 -1 0)
|
||||
(#set! injection.include-children))
|
||||
((plus_metadata) @injection.content
|
||||
(#set! injection.language "toml")
|
||||
(#offset! @injection.content 1 0 -1 0)
|
||||
(#set! injection.include-children))
|
||||
|
||||
([
|
||||
(inline)
|
||||
(pipe_table_cell)
|
||||
] @injection.content
|
||||
(#set! injection.language "markdown_inline"))
|
||||
] @injection.content
|
||||
(#set! injection.language "markdown_inline"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue