@@ -16,6 +16,7 @@ test-support = [
"project/test-support",
"util/test-support",
"workspace/test-support",
+ "tree-sitter-rust"
]
[dependencies]
@@ -48,6 +49,7 @@ rand = { version = "0.8.3", optional = true }
serde = { version = "1.0", features = ["derive", "rc"] }
smallvec = { version = "1.6", features = ["union"] }
smol = "1.2"
+tree-sitter-rust = { version = "*", optional = true }
[dev-dependencies]
text = { path = "../text", features = ["test-support"] }
@@ -43,7 +43,7 @@ pub use multi_buffer::{
ToPoint,
};
use ordered_float::OrderedFloat;
-use project::{HoverBlock, Project, ProjectPath, ProjectTransaction};
+use project::{Project, ProjectPath, ProjectTransaction};
use selections_collection::{resolve_multiple, MutableSelectionsCollection, SelectionsCollection};
use serde::{Deserialize, Serialize};
use settings::Settings;
@@ -6148,10 +6148,7 @@ pub fn styled_runs_for_code_label<'a>(
#[cfg(test)]
mod tests {
use crate::{
- hover_popover::{
- hover, hover_at, HoverAt, HOVER_DELAY_MILLIS, HOVER_GRACE_MILLIS,
- HOVER_REQUEST_DELAY_MILLIS,
- },
+ hover_popover::{hover, hover_at, HoverAt, HOVER_DELAY_MILLIS, HOVER_GRACE_MILLIS},
test::{
assert_text_with_selections, build_editor, select_ranges, EditorLspTestContext,
EditorTestContext,
@@ -217,7 +217,7 @@ fn show_hover(
this.hover_state.popover = hover_popover;
cx.notify();
} else {
- if this.hover_state.popover.is_some() {
+ if this.hover_state.visible() {
// Popover was visible, but now is hidden. Dismiss it
hide_hover(this, cx);
} else {
@@ -449,6 +449,7 @@ impl<'a> EditorLspTestContext<'a> {
}
}
+ #[cfg(feature = "test-support")]
pub async fn new_rust(
capabilities: lsp::ServerCapabilities,
cx: &'a mut gpui::TestAppContext,