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:
Santos Gallegos 2021-04-28 07:19:07 -05:00 committed by GitHub
parent 563616738b
commit 4a7a713c52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 46 additions and 41 deletions

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1,3 +1,3 @@
(preproc_arg) @c
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1,3 +1,3 @@
(preproc_arg) @cpp
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1,5 +1,5 @@
(comment) @jsdoc
(comment) @comment
(comment) @jsdoc @combined
(comment) @comment @combined
((regex_pattern) @regex)

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -9,4 +9,4 @@
((script_element
(raw_text) @javascript))
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1,4 +1,4 @@
((triple_string) @markdown
(#offset! @markdown 0 3 0 -3))
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -9,4 +9,4 @@
(#eq? @_cdef_identifier "cdef")
)
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1,3 +1,3 @@
(ocaml) @ocaml
(comment) @comment
(comment) @comment @combined

View file

@ -1,3 +1,3 @@
(text) @html
(comment) @comment
(comment) @comment @combined

View file

@ -23,4 +23,4 @@
(((expression_statement (assignment)) . (expression_statement (string) @rst))
(#offset! @rst 0 3 0 -3))
(comment) @comment
(comment) @comment @combined

View file

@ -2,4 +2,4 @@
(line_comment)
(block_comment)
(qldoc)
] @comment
] @comment @combined

View file

@ -3,4 +3,4 @@
parameters: (parameters (string) @regex))
(#match? @_name "^#?(not-)?(match|vim-match|lua-match)$"))
(comment) @comment
(comment) @comment @combined

View file

@ -59,4 +59,4 @@
(role) @_role)
(#eq? @_role ":math:"))
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -9,4 +9,4 @@
[
(line_comment)
(block_comment)
] @comment
] @comment @combined

View file

@ -37,3 +37,5 @@
] @punctuation.bracket
(include_statement (identifier) @function)
(single_line_comment) @comment

View file

@ -0,0 +1,3 @@
; inherits: css
(single_line_comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1,4 +1,4 @@
[
(line_comment)
(block_comment)
] @comment
] @comment @combined

View file

@ -29,4 +29,4 @@
(#match? @_lang "(ts|typescript)")
)
(comment) @comment
(comment) @comment @combined

View file

@ -9,4 +9,4 @@
(#eq? @_cdef_identifier "cdef")
)
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -29,4 +29,4 @@
(quoted_attribute_value
(attribute_value) @javascript)))
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(comment) @comment
(comment) @comment @combined

View file

@ -1 +1 @@
(line_comment) @comment
(line_comment) @comment @combined