Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tree sitter rust #4717

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ indent = { tab-width = 4, unit = " " }

[[grammar]]
name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "a360da0a29a19c281d08295a35ecd0544d2da211" }
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "0431a2c60828731f27491ee9fdefe25e250ce9c9" }

[[language]]
name = "nix"
Expand Down
2 changes: 1 addition & 1 deletion helix-core/tests/data/indent/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ indent = { tab-width = 4, unit = " " }

[[grammar]]
name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "a360da0a29a19c281d08295a35ecd0544d2da211" }
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "0431a2c60828731f27491ee9fdefe25e250ce9c9" }
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ args = { attachCommands = [ "platform select remote-gdb-server", "platform conne

[[grammar]]
name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "41e23b454f503e6fe63ec4b6d9f7f2cf7788ab8e" }
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "0431a2c60828731f27491ee9fdefe25e250ce9c9" }

[[language]]
name = "toml"
Expand Down
4 changes: 2 additions & 2 deletions runtime/queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@
; ---
; Macros
; ---
(meta_item
(attribute
(identifier) @function.macro)
(attr_item
(attribute
[
(identifier) @function.macro
(scoped_identifier
Expand Down
5 changes: 3 additions & 2 deletions runtime/queries/rust/indents.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/rust/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

(; #[test]
(attribute_item
(meta_item
(attribute
(identifier) @_test_attribute))
; allow other attributes like #[should_panic] and comments
[
Expand Down