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", "menu2",
"postage", "postage",
"project2", "project2",
"semantic_index2",
"serde", "serde",
"serde_derive", "serde_derive",
"serde_json", "serde_json",

View file

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

View file

@ -21,7 +21,7 @@ theme = { package = "theme2", path = "../theme2" }
util = { path = "../util" } util = { path = "../util" }
ui = {package = "ui2", path = "../ui2"} ui = {package = "ui2", path = "../ui2"}
workspace = { package = "workspace2", path = "../workspace2" } workspace = { package = "workspace2", path = "../workspace2" }
#semantic_index = { path = "../semantic_index" } semantic_index = { package = "semantic_index2", path = "../semantic_index2" }
anyhow.workspace = true anyhow.workspace = true
futures.workspace = true futures.workspace = true
log.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; pub mod buffer_search;
mod history; mod history;
mod mode; mod mode;
//pub mod project_search; pub mod project_search;
pub(crate) mod search_bar; pub(crate) mod search_bar;
pub fn init(cx: &mut AppContext) { pub fn init(cx: &mut AppContext) {
buffer_search::init(cx); buffer_search::init(cx);
//project_search::init(cx); project_search::init(cx);
} }
actions!( actions!(
@ -44,6 +44,7 @@ bitflags! {
const NONE = 0b000; const NONE = 0b000;
const WHOLE_WORD = 0b001; const WHOLE_WORD = 0b001;
const CASE_SENSITIVE = 0b010; const CASE_SENSITIVE = 0b010;
const INCLUDE_IGNORED = 0b100;
} }
} }