mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 20:30:05 -04:00
refactor(format): drop extra indentation for field
This commit is contained in:
parent
c28396de30
commit
722617e672
140 changed files with 2146 additions and 2766 deletions
|
|
@ -14,10 +14,9 @@
|
|||
; Directives with nested content without arguments, but with options
|
||||
((directive
|
||||
name: (type) @_type
|
||||
body:
|
||||
(body
|
||||
(options)
|
||||
(content) @injection.content))
|
||||
body: (body
|
||||
(options)
|
||||
(content) @injection.content))
|
||||
(#set! injection.language "rst")
|
||||
(#any-of? @_type
|
||||
"attention" "caution" "danger" "error" "hint" "important" "note" "tip" "warning" "admonition"
|
||||
|
|
@ -26,9 +25,8 @@
|
|||
; Directives with nested content with arguments and options
|
||||
((directive
|
||||
name: (type) @_type
|
||||
body:
|
||||
(body
|
||||
(content) @injection.content))
|
||||
body: (body
|
||||
(content) @injection.content))
|
||||
(#set! injection.language "rst")
|
||||
(#any-of? @_type
|
||||
"figure" "topic" "sidebar" "container" "table" "list-table" "class" "role"
|
||||
|
|
@ -37,25 +35,22 @@
|
|||
; Special directives
|
||||
((directive
|
||||
name: (type) @_type
|
||||
body:
|
||||
(body
|
||||
(arguments) @injection.language
|
||||
(content) @injection.content))
|
||||
body: (body
|
||||
(arguments) @injection.language
|
||||
(content) @injection.content))
|
||||
(#any-of? @_type "raw" "code" "code-block" "sourcecode"))
|
||||
|
||||
((directive
|
||||
name: (type) @_type
|
||||
body:
|
||||
(body
|
||||
(content) @injection.content))
|
||||
body: (body
|
||||
(content) @injection.content))
|
||||
(#set! injection.language "latex")
|
||||
(#eq? @_type "math"))
|
||||
|
||||
((directive
|
||||
name: (type) @_type
|
||||
body:
|
||||
(body
|
||||
(content) @injection.content))
|
||||
body: (body
|
||||
(content) @injection.content))
|
||||
(#set! injection.language "csv")
|
||||
(#eq? @_type "csv-table"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue