M2.5: symbol index and go-to commands

crates/index: walks the project with the search/VFS rules (vendor as
library), parses .php files from tree-sitter outlines on a worker pool
off the engine lock, updates incrementally from disk and buffers through
an updater thread, caps at 200,000 files, and answers fuzzy file, class
and symbol queries (nucleo-matcher, MPL-2.0 as a separate crate).

Engine: index.status, goto.file, goto.class, goto.symbol; events
indexProgress and indexReady drained by the pump; the index starts on
project.open and is cancelled on close. Tests: unit, incremental,
property (random queries and sources), engine and TCP control tests,
release timing on a generated 20k-file project (3.9-4.2 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-17 12:53:33 +02:00
parent f13a49064d
commit 053441d066
26 changed files with 3455 additions and 9 deletions

View file

@ -234,7 +234,8 @@ pub fn sync_buffer_dirs(state: &mut State) {
workspace.pin_dirs(dirs);
}
/// Applies pending changes on disk to the state: queues
/// Applies pending changes on disk to the state: hands them to the symbol
/// index ([`crate::cmd::goto::note_disk_changes`]), queues
/// [`Event::TreeChanged`] for affected directories, reloads clean buffers
/// whose file changed, and queues [`Event::FileChangedOnDisk`] for dirty
/// buffers and for buffers whose file disappeared.
@ -244,6 +245,7 @@ pub fn pump(state: &mut State) {
};
let (changes, failure) = workspace.drain();
let root = workspace.project.root().to_path_buf();
crate::cmd::goto::note_disk_changes(state, &changes);
let mut dirs: Vec<PathBuf> = Vec::new();
let mut add_dir = |path: &Path| {
let dir = path.parent().map(Path::to_path_buf).unwrap_or_default();