Barebones project search (no UI, but the crate compiles)

This commit is contained in:
Piotr Osiewicz 2023-12-07 14:36:45 +01:00
parent ea708c50f0
commit 0c23e6738b
5 changed files with 759 additions and 750 deletions

1
Cargo.lock generated
View file

@ -8252,6 +8252,7 @@ dependencies = [
"menu2",
"postage",
"project2",
"semantic_index2",
"serde",
"serde_derive",
"serde_json",

View file

@ -8682,13 +8682,13 @@ impl Editor {
);
}
// pub fn set_searchable(&mut self, searchable: bool) {
// self.searchable = searchable;
// }
pub fn set_searchable(&mut self, searchable: bool) {
self.searchable = searchable;
}
// pub fn searchable(&self) -> bool {
// self.searchable
// }
pub fn searchable(&self) -> bool {
self.searchable
}
fn open_excerpts(&mut self, _: &OpenExcerpts, cx: &mut ViewContext<Self>) {
let buffer = self.buffer.read(cx);

View file

@ -21,7 +21,7 @@ theme = { package = "theme2", path = "../theme2" }
util = { path = "../util" }
ui = {package = "ui2", path = "../ui2"}
workspace = { package = "workspace2", path = "../workspace2" }
#semantic_index = { path = "../semantic_index" }
semantic_index = { package = "semantic_index2", path = "../semantic_index2" }
anyhow.workspace = true
futures.workspace = true
log.workspace = true

File diff suppressed because it is too large Load diff

View file

@ -13,12 +13,12 @@ use ui::{ButtonStyle, Icon, IconButton};
pub mod buffer_search;
mod history;
mod mode;
//pub mod project_search;
pub mod project_search;
pub(crate) mod search_bar;
pub fn init(cx: &mut AppContext) {
buffer_search::init(cx);
//project_search::init(cx);
project_search::init(cx);
}
actions!(
@ -44,6 +44,7 @@ bitflags! {
const NONE = 0b000;
const WHOLE_WORD = 0b001;
const CASE_SENSITIVE = 0b010;
const INCLUDE_IGNORED = 0b100;
}
}