Fix most of the TODOs

This commit is contained in:
Kirill Bulatov 2023-11-16 22:48:26 +02:00
parent 6028cd90d4
commit 8180938401
5 changed files with 8 additions and 6 deletions

View File

@ -268,7 +268,9 @@
// Whether to show warnings or not by default.
"include_warnings": true
},
// TODO kb docs
// Add files or globs of files that will be excluded by Zed entirely:
// they will be skipped during FS scan(s), file tree and file search
// will lack the corresponding file entries.
"file_scan_exclusions": [
"**/.git",
"**/.svn",

View File

@ -1381,8 +1381,6 @@ async fn test_share_project(
Path::new("a.txt"),
Path::new("b.txt"),
Path::new("ignored-dir"),
Path::new("ignored-dir/c.txt"),
Path::new("ignored-dir/d.txt"),
]
);
});

View File

@ -10,7 +10,6 @@ pub struct ProjectSettings {
pub lsp: HashMap<Arc<str>, LspSettings>,
#[serde(default)]
pub git: GitSettings,
// TODO kb docs and project_search test
#[serde(default)]
pub file_scan_exclusions: Option<Vec<String>>,
}

View File

@ -3502,6 +3502,7 @@ impl BackgroundScanner {
let state = self.state.lock();
let snapshot = &state.snapshot;
root_abs_path = snapshot.abs_path().clone();
// TODO kb we need `DOT_GIT` and `GITIGNORE` entries always processed.
if snapshot.is_abs_path_excluded(&job.abs_path) {
log::error!("skipping excluded directory {:?}", job.path);
return Ok(());

View File

@ -1767,14 +1767,16 @@ impl View for ProjectSearchBar {
render_option_button_icon("icons/word_search.svg", SearchOptions::WHOLE_WORD, cx)
});
let include_ignored = is_semantic_disabled.then(|| {
let mut include_ignored = is_semantic_disabled.then(|| {
render_option_button_icon(
// TODO kb icon
// TODO proper icon
"icons/case_insensitive.svg",
SearchOptions::INCLUDE_IGNORED,
cx,
)
});
// TODO not implemented yet
let _ = include_ignored.take();
let search_button_for_mode = |mode, side, cx: &mut ViewContext<ProjectSearchBar>| {
let is_active = if let Some(search) = self.active_project_search.as_ref() {