aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/rust
diff options
context:
space:
mode:
authorAlexis (Poliorcetics) Bourget2022-11-11 22:51:58 +0000
committerMichael Davis2022-11-12 00:43:55 +0000
commite232333d4aae5fc56182df896aec02c597590e4f (patch)
treef0af2aa471723c0e04cf88c295eded5b47adfcc7 /runtime/queries/rust
parent53b70d821e552f9ebd89d6352d6eaf87a6a3ef6c (diff)
fix: Outdated Rust queries after TS update
Ref: https://github.com/tree-sitter/tree-sitter-rust/commit/3ddebf46e6fe5e27fa03dc07a829a766b9979c8d
Diffstat (limited to 'runtime/queries/rust')
-rw-r--r--runtime/queries/rust/highlights.scm4
-rw-r--r--runtime/queries/rust/indents.scm5
-rw-r--r--runtime/queries/rust/textobjects.scm2
3 files changed, 6 insertions, 5 deletions
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm
index 42fc9681..5606e93d 100644
--- a/runtime/queries/rust/highlights.scm
+++ b/runtime/queries/rust/highlights.scm
@@ -271,9 +271,9 @@
; ---
; Macros
; ---
-(meta_item
+(attribute
(identifier) @function.macro)
-(attr_item
+(attribute
[
(identifier) @function.macro
(scoped_identifier
diff --git a/runtime/queries/rust/indents.scm b/runtime/queries/rust/indents.scm
index 600c77a3..5c2c70d0 100644
--- a/runtime/queries/rust/indents.scm
+++ b/runtime/queries/rust/indents.scm
@@ -51,13 +51,14 @@
.
(_) @expr-start
value: (_) @indent
+ alternative: (_)? @indent
(#not-same-line? @indent @expr-start)
(#set! "scope" "all")
)
-(if_let_expression
+(if_expression
.
(_) @expr-start
- value: (_) @indent
+ condition: (_) @indent
(#not-same-line? @indent @expr-start)
(#set! "scope" "all")
)
diff --git a/runtime/queries/rust/textobjects.scm b/runtime/queries/rust/textobjects.scm
index 7005d9c7..496f752e 100644
--- a/runtime/queries/rust/textobjects.scm
+++ b/runtime/queries/rust/textobjects.scm
@@ -42,7 +42,7 @@
(; #[test]
(attribute_item
- (meta_item
+ (attribute
(identifier) @_test_attribute))
; allow other attributes like #[should_panic] and comments
[