Skip to main content

Module watcher

Module watcher 

Source
Expand description

Background file watcher for automatic re-indexing of code-symbol entities.

Launch per-project watches via spawn_watcher. Re-indexing goes through crate::actions::code::handle_code_index, which resolves the project’s database from crate::code_registry; the watcher holds that project’s Arc<GraphHandle> for its lifetime so the canonical instance stays open. The watcher uses OS-native filesystem events (notify crate) with a 2-second debounce window to avoid thrashing during bulk edits / git operations.

Functions§

spawn_watcher
Spawn a background thread that watches path (recursively) for file modifications and re-indexes changed files under the given project.