Upgrade tree-sitter to v0.20.6
This commit also adds a regression test to verify that with this new version we don't mistakenly compute a different suggestion on Rust buffer where the only change is leading whitespace.
This commit is contained in:
parent
5c4bd9393f
commit
8ebefa143a
3 changed files with 20 additions and 3 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -5381,9 +5381,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tree-sitter"
|
name = "tree-sitter"
|
||||||
version = "0.20.4"
|
version = "0.20.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4e34327f8eac545e3f037382471b2b19367725a242bba7bc45edb9efb49fe39a"
|
checksum = "09b3b781640108d29892e8b9684642d2cda5ea05951fd58f0fea1db9edeb9b71"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"regex",
|
"regex",
|
||||||
|
|
|
@ -649,6 +649,23 @@ fn test_autoindent_does_not_adjust_lines_with_unchanged_suggestion(cx: &mut Muta
|
||||||
);
|
);
|
||||||
buffer
|
buffer
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cx.add_model(|cx| {
|
||||||
|
let text = "fn a() {\n {\n b()?\n }\n\n Ok(())\n}";
|
||||||
|
let mut buffer = Buffer::new(0, text, cx).with_language(Arc::new(rust_lang()), cx);
|
||||||
|
buffer.edit_with_autoindent([(Point::new(3, 4)..Point::new(3, 5), "")], 4, cx);
|
||||||
|
assert_eq!(
|
||||||
|
buffer.text(),
|
||||||
|
"fn a() {\n {\n b()?\n \n\n Ok(())\n}"
|
||||||
|
);
|
||||||
|
|
||||||
|
buffer.edit_with_autoindent([(Point::new(3, 0)..Point::new(3, 12), "")], 4, cx);
|
||||||
|
assert_eq!(
|
||||||
|
buffer.text(),
|
||||||
|
"fn a() {\n {\n b()?\n\n\n Ok(())\n}"
|
||||||
|
);
|
||||||
|
buffer
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
|
|
|
@ -85,7 +85,7 @@ tempdir = { version = "0.3.7" }
|
||||||
thiserror = "1.0.29"
|
thiserror = "1.0.29"
|
||||||
tiny_http = "0.8"
|
tiny_http = "0.8"
|
||||||
toml = "0.5"
|
toml = "0.5"
|
||||||
tree-sitter = "0.20.4"
|
tree-sitter = "0.20.6"
|
||||||
tree-sitter-c = "0.20.1"
|
tree-sitter-c = "0.20.1"
|
||||||
tree-sitter-json = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "137e1ce6a02698fc246cdb9c6b886ed1de9a1ed8" }
|
tree-sitter-json = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "137e1ce6a02698fc246cdb9c6b886ed1de9a1ed8" }
|
||||||
tree-sitter-rust = "0.20.1"
|
tree-sitter-rust = "0.20.1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue