Project search2 (#3585)
Semantic search and tests are gonna be shipped in a separate PR. Release Notes: - N/A
This commit is contained in:
commit
bc130fd6b0
7 changed files with 1673 additions and 1545 deletions
23
Cargo.lock
generated
23
Cargo.lock
generated
|
@ -1388,11 +1388,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.83"
|
||||
version = "1.0.84"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
|
||||
checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
]
|
||||
|
||||
|
@ -4671,15 +4670,6 @@ version = "0.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
||||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
version = "0.1.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "journal"
|
||||
version = "0.1.0"
|
||||
|
@ -5055,18 +5045,18 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
|||
|
||||
[[package]]
|
||||
name = "linkme"
|
||||
version = "0.3.18"
|
||||
version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1e6b0bb9ca88d3c5ae88240beb9683821f903b824ee8381ef9ab4e8522fbfa9"
|
||||
checksum = "91ed2ee9464ff9707af8e9ad834cffa4802f072caad90639c583dd3c62e6e608"
|
||||
dependencies = [
|
||||
"linkme-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linkme-impl"
|
||||
version = "0.3.18"
|
||||
version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3b3f61e557a617ec6ba36c79431e1f3b5e100d67cfbdb61ed6ef384298af016"
|
||||
checksum = "ba125974b109d512fccbc6c0244e7580143e460895dfd6ea7f8bbb692fd94396"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -8300,6 +8290,7 @@ dependencies = [
|
|||
"menu2",
|
||||
"postage",
|
||||
"project2",
|
||||
"semantic_index2",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
|
|
|
@ -8706,13 +8706,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);
|
||||
|
|
|
@ -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
|
@ -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!(
|
||||
|
@ -47,6 +47,7 @@ bitflags! {
|
|||
const NONE = 0b000;
|
||||
const WHOLE_WORD = 0b001;
|
||||
const CASE_SENSITIVE = 0b010;
|
||||
const INCLUDE_IGNORED = 0b100;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ pub enum Icon {
|
|||
FileRust,
|
||||
FileToml,
|
||||
FileTree,
|
||||
Filter,
|
||||
Folder,
|
||||
FolderOpen,
|
||||
FolderX,
|
||||
|
@ -140,6 +141,7 @@ impl Icon {
|
|||
Icon::FileRust => "icons/file_icons/rust.svg",
|
||||
Icon::FileToml => "icons/file_icons/toml.svg",
|
||||
Icon::FileTree => "icons/project.svg",
|
||||
Icon::Filter => "icons/filter.svg",
|
||||
Icon::Folder => "icons/file_icons/folder.svg",
|
||||
Icon::FolderOpen => "icons/file_icons/folder_open.svg",
|
||||
Icon::FolderX => "icons/stop_sharing.svg",
|
||||
|
|
|
@ -24,6 +24,7 @@ use anyhow::{anyhow, Context as _};
|
|||
use futures::{channel::mpsc, StreamExt};
|
||||
use project_panel::ProjectPanel;
|
||||
use quick_action_bar::QuickActionBar;
|
||||
use search::project_search::ProjectSearchBar;
|
||||
use settings::{initial_local_settings_content, load_default_keymap, KeymapFile, Settings};
|
||||
use std::{borrow::Cow, ops::Deref, sync::Arc};
|
||||
use terminal_view::terminal_panel::TerminalPanel;
|
||||
|
@ -429,8 +430,8 @@ fn initialize_pane(workspace: &mut Workspace, pane: &View<Pane>, cx: &mut ViewCo
|
|||
toolbar.add_item(quick_action_bar, cx);
|
||||
let diagnostic_editor_controls = cx.build_view(|_| diagnostics::ToolbarControls::new());
|
||||
// toolbar.add_item(diagnostic_editor_controls, cx);
|
||||
// let project_search_bar = cx.add_view(|_| ProjectSearchBar::new());
|
||||
// toolbar.add_item(project_search_bar, cx);
|
||||
let project_search_bar = cx.build_view(|_| ProjectSearchBar::new());
|
||||
toolbar.add_item(project_search_bar, cx);
|
||||
// let lsp_log_item =
|
||||
// cx.add_view(|_| language_tools::LspLogToolbarItemView::new());
|
||||
// toolbar.add_item(lsp_log_item, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue