aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-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
[