Skip to content

Commit

Permalink
chore: update tree-sitter-rust to v0.21.0 (helix-editor#10365)
Browse files Browse the repository at this point in the history
* chore: update tree-sitter-rust to 0.21.0

* fix: pretty print and textobject tests
  • Loading branch information
pedromfedricci authored and postsolar committed Apr 20, 2024
1 parent e2a4e67 commit 79e6f14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2765,10 +2765,10 @@ mod test {
)
};

test("quantified_nodes", 1..36);
test("quantified_nodes", 1..37);
// NOTE: Enable after implementing proper node group capturing
// test("quantified_nodes_grouped", 1..36);
// test("multiple_nodes_grouped", 1..36);
// test("quantified_nodes_grouped", 1..37);
// test("multiple_nodes_grouped", 1..37);
}

#[test]
Expand Down Expand Up @@ -2939,7 +2939,7 @@ mod test {

#[test]
fn test_pretty_print() {
let source = r#"/// Hello"#;
let source = r#"// Hello"#;
assert_pretty_print("rust", source, "(line_comment)", 0, source.len());

// A large tree should be indented with fields:
Expand All @@ -2958,7 +2958,8 @@ mod test {
" (macro_invocation\n",
" macro: (identifier)\n",
" (token_tree\n",
" (string_literal))))))",
" (string_literal\n",
" (string_content)))))))",
),
0,
source.len(),
Expand Down
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ args = { attachCommands = [ "platform select remote-gdb-server", "platform conne

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

[[language]]
name = "sway"
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
(lifetime
"'" @label
(identifier) @label)
(loop_label
(label
"'" @label
(identifier) @label)

Expand Down

0 comments on commit 79e6f14

Please sign in to comment.