mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 04:10:06 -04:00
Comment: use @combined to create just one tree per buffer (#1252)
* Comment: use `@combined` to create just one tree per buffer There is no need to create a tree per line/block for comments. Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251 * Add injections for scss * Fix jsonc * Combine jsdoc
This commit is contained in:
parent
563616738b
commit
4a7a713c52
42 changed files with 46 additions and 41 deletions
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
(preproc_arg) @c
|
(preproc_arg) @c
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
(preproc_arg) @cpp
|
(preproc_arg) @cpp
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
(comment) @jsdoc
|
(comment) @jsdoc @combined
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
||||||
((regex_pattern) @regex)
|
((regex_pattern) @regex)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
((script_element
|
((script_element
|
||||||
(raw_text) @javascript))
|
(raw_text) @javascript))
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
((triple_string) @markdown
|
((triple_string) @markdown
|
||||||
(#offset! @markdown 0 3 0 -3))
|
(#offset! @markdown 0 3 0 -3))
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
(#eq? @_cdef_identifier "cdef")
|
(#eq? @_cdef_identifier "cdef")
|
||||||
)
|
)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
(ocaml) @ocaml
|
(ocaml) @ocaml
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
(text) @html
|
(text) @html
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,4 @@
|
||||||
(((expression_statement (assignment)) . (expression_statement (string) @rst))
|
(((expression_statement (assignment)) . (expression_statement (string) @rst))
|
||||||
(#offset! @rst 0 3 0 -3))
|
(#offset! @rst 0 3 0 -3))
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
(qldoc)
|
(qldoc)
|
||||||
] @comment
|
] @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@
|
||||||
parameters: (parameters (string) @regex))
|
parameters: (parameters (string) @regex))
|
||||||
(#match? @_name "^#?(not-)?(match|vim-match|lua-match)$"))
|
(#match? @_name "^#?(not-)?(match|vim-match|lua-match)$"))
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,4 @@
|
||||||
(role) @_role)
|
(role) @_role)
|
||||||
(#eq? @_role ":math:"))
|
(#eq? @_role ":math:"))
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
[
|
[
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
] @comment
|
] @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -37,3 +37,5 @@
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
(include_statement (identifier) @function)
|
(include_statement (identifier) @function)
|
||||||
|
|
||||||
|
(single_line_comment) @comment
|
||||||
|
|
|
||||||
3
queries/scss/injections.scm
Normal file
3
queries/scss/injections.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
; inherits: css
|
||||||
|
|
||||||
|
(single_line_comment) @comment @combined
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[
|
[
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
] @comment
|
] @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,4 @@
|
||||||
(#match? @_lang "(ts|typescript)")
|
(#match? @_lang "(ts|typescript)")
|
||||||
)
|
)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
(#eq? @_cdef_identifier "cdef")
|
(#eq? @_cdef_identifier "cdef")
|
||||||
)
|
)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,4 @@
|
||||||
(quoted_attribute_value
|
(quoted_attribute_value
|
||||||
(attribute_value) @javascript)))
|
(attribute_value) @javascript)))
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(comment) @comment
|
(comment) @comment @combined
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
(line_comment) @comment
|
(line_comment) @comment @combined
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue