mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
started branch
This commit is contained in:
parent
632a9f1e3c
commit
005a3ca7f1
3 changed files with 35 additions and 0 deletions
24
queries/rust/folds.scm
Normal file
24
queries/rust/folds.scm
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[(function_item)
|
||||||
|
(struct_item)
|
||||||
|
(enum_item)
|
||||||
|
(impl_item)
|
||||||
|
(type_item)
|
||||||
|
(union_item)
|
||||||
|
|
||||||
|
(use_declaration)
|
||||||
|
(let_declaration)
|
||||||
|
|
||||||
|
(loop_expression)
|
||||||
|
(for_expression)
|
||||||
|
(while_expression)
|
||||||
|
(if_expression)
|
||||||
|
(if_let_expression)
|
||||||
|
(match_expression)
|
||||||
|
(call_expression)
|
||||||
|
|
||||||
|
(macro_definition)
|
||||||
|
(macro_invocation)
|
||||||
|
|
||||||
|
(attribute_item)
|
||||||
|
]
|
||||||
|
@fold
|
||||||
|
|
@ -86,6 +86,10 @@
|
||||||
macro: (scoped_identifier
|
macro: (scoped_identifier
|
||||||
(identifier) @function.macro .))
|
(identifier) @function.macro .))
|
||||||
|
|
||||||
|
(metavariable) @function.macro
|
||||||
|
|
||||||
|
"$" @function.macro
|
||||||
|
|
||||||
; Function definitions
|
; Function definitions
|
||||||
|
|
||||||
(function_item (identifier) @function)
|
(function_item (identifier) @function)
|
||||||
|
|
|
||||||
7
queries/rust/injections.scm
Normal file
7
queries/rust/injections.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
(macro_invocation
|
||||||
|
(token_tree) @rust)
|
||||||
|
|
||||||
|
(macro_definition
|
||||||
|
(macro_rule
|
||||||
|
left: (token_tree_pattern) @rust
|
||||||
|
right: (token_tree) @rust))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue