mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Upgrade Tree-sitter and limit query cursors' concurrently-buffered matches
This commit is contained in:
parent
a82e56918e
commit
1f16c68e6b
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -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",
|
||||
|
@ -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" }
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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" }
|
||||
|
Loading…
Reference in New Issue
Block a user