Fix most of the TODOs

Kirill Bulatov created

Change summary

assets/settings/default.json                 | 4 +++-
crates/collab/src/tests/integration_tests.rs | 2 --
crates/project/src/project_settings.rs       | 1 -
crates/project/src/worktree.rs               | 1 +
crates/search/src/project_search.rs          | 6 ++++--
5 files changed, 8 insertions(+), 6 deletions(-)

Detailed changes

assets/settings/default.json 🔗

@@ -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",

crates/collab/src/tests/integration_tests.rs 🔗

@@ -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"),
             ]
         );
     });

crates/project/src/project_settings.rs 🔗

@@ -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>>,
 }

crates/project/src/worktree.rs 🔗

@@ -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(());

crates/search/src/project_search.rs 🔗

@@ -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() {