diff --git a/Cargo.lock b/Cargo.lock index 0fd0c8a212eb84638b1a4659f1f80b1a732bfb1a..7d30d2703fc1c0deb1611ab7deb324acff0c61b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5374,8 +5374,7 @@ dependencies = [ [[package]] name = "tree-sitter" version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268bf3e3ca0c09e5d21b59c2638e12cb6dcf7ea2681250a696a2d0936cb57ba0" +source = "git+https://github.com/tree-sitter/tree-sitter?rev=1f1b1eb4501ed0a2d195d37f7de15f72aa10acd0#1f1b1eb4501ed0a2d195d37f7de15f72aa10acd0" dependencies = [ "cc", "regex", diff --git a/Cargo.toml b/Cargo.toml index c4ae77606c96878bd798c23b54333e9653f14965..5b5e5bf85cff8d87042f2f701dc381a5f4064b7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,9 @@ default-members = ["crates/zed"] resolver = "2" [patch.crates-io] +tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "1f1b1eb4501ed0a2d195d37f7de15f72aa10acd0" } async-task = { git = "https://github.com/zed-industries/async-task", rev = "341b57d6de98cdfd7b418567b8de2022ca993a6e" } + # TODO - Remove when a version is released with this PR: https://github.com/servo/core-foundation-rs/pull/457 cocoa = { git = "https://github.com/servo/core-foundation-rs", rev = "079665882507dd5e2ff77db3de5070c1f6c0fb85" } cocoa-foundation = { git = "https://github.com/servo/core-foundation-rs", rev = "079665882507dd5e2ff77db3de5070c1f6c0fb85" } diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rs index d5ed1c1620da0b514ba22f4c04e050f5043c67fb..0d56ac19798baad3fb3bf22b53ab9f599d3b3166 100644 --- a/crates/language/src/buffer.rs +++ b/crates/language/src/buffer.rs @@ -2393,12 +2393,12 @@ impl<'a> Iterator for BufferChunks<'a> { impl QueryCursorHandle { pub(crate) fn new() -> Self { - QueryCursorHandle(Some( - QUERY_CURSORS - .lock() - .pop() - .unwrap_or_else(|| QueryCursor::new()), - )) + let mut cursor = QUERY_CURSORS + .lock() + .pop() + .unwrap_or_else(|| QueryCursor::new()); + cursor.set_match_limit(64); + QueryCursorHandle(Some(cursor)) } } diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 88acfdb14dd2f3796c5715abfe56a4c8da8fd829..52c7bb1fab7a17602288dc7dd5627009e49f42b5 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -88,7 +88,7 @@ tempdir = { version = "0.3.7" } thiserror = "1.0.29" tiny_http = "0.8" toml = "0.5" -tree-sitter = "0.20.8" +tree-sitter = "0.20" tree-sitter-c = "0.20.1" tree-sitter-cpp = "0.20.0" tree-sitter-go = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "aeb2f33b366fd78d5789ff104956ce23508b85db" }