mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -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
|
|
@ -22,9 +22,8 @@
|
|||
name: (type) @function)
|
||||
|
||||
(directive
|
||||
body:
|
||||
(body
|
||||
(arguments) @variable.parameter))
|
||||
body: (body
|
||||
(arguments) @variable.parameter))
|
||||
|
||||
((directive
|
||||
name: (type) @keyword.import)
|
||||
|
|
@ -143,9 +142,8 @@
|
|||
|
||||
(directive
|
||||
name: (type) @_directive
|
||||
body:
|
||||
(body
|
||||
(content) @spell
|
||||
(#not-any-of? @_directive "code" "code-block" "sourcecode")))
|
||||
body: (body
|
||||
(content) @spell
|
||||
(#not-any-of? @_directive "code" "code-block" "sourcecode")))
|
||||
|
||||
(paragraph) @spell
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,8 @@
|
|||
; The role directive can define a new role
|
||||
((directive
|
||||
name: (type) @_type
|
||||
body:
|
||||
(body
|
||||
(arguments) @local.definition))
|
||||
body: (body
|
||||
(arguments) @local.definition))
|
||||
(#eq? @_type "role"))
|
||||
|
||||
; References
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue