feat(lsp): show workspace TODOs via LSP pull diagnostics #130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "129_lsp-workspace-todo-diagnostics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #129.
Summary
textDocument/diagnostic,workspace/diagnostic) so open/waiting@Taskshards across all.mdfiles in the workspace are surfaced, not just the currently open buffer. AdvertisesdiagnosticProviderwithworkspaceDiagnostics: true.Information-severity diagnostics (message = the todo's line text,[waiting]-prefixed for waiting tasks). R15/R18 diagnostics remain push-only and unchanged; todos are exposed exclusively via the new pull methods to avoid duplicate reporting.**/*.mdfile watcher (alongside the existing.streamd.tomlone) that invalidates the affected file's cache and sendsworkspace/diagnostic/refresh; also refreshes afterdidSaveso edits show up without waiting on the client's own pull heuristics.workspace/symbolnow additionally emits a symbol per open/waiting todo whose name is the todo's own text (not just the marker name), so todos are findable by content via fuzzy symbol search.workspace/symbol,textDocument/references, andtextDocument/renamepreviously only scanned the top-level directory (WalkDir::max_depth(1)); all three (plus the new todo index) now share one recursive file-listing helper that skips dotdirs like.git.Implementation notes / scope decisions
(from the refinement plan on #129, confirmed with the reporter before implementation)
task == openandtask == waitingcount as todos.Information(notHint), since Hint-level diagnostics are often filtered or underline-only in editor problem panels.resultId/unchanged-report caching in this pass — each request recomputes from current state. Acceptable for typical vault sizes; can be added later if profiling shows it's needed.textDocument/documentSymboltodo entries, done/open diagnostic tags, push-diagnostics fallback (only needed if pull diagnostics prove unreliable in Zed in practice).Test plan
cargo test— all existing tests pass, plus new unit tests forlist_markdown_files(recursive, skips dotdirs),extract_todo_items(open/waiting extraction),todo_diagnostics(severity/message/range), andcollect_todo_symbols(name = todo text, query filtering).cargo clippy --all-targetsclean.nix flake check— all checks pass (clippy, fmt, tests, pre-commit)..streamd.tomland multiple note files containing@Taskmarkers in subdirectories, and confirming the diagnostics panel and workspace symbol search both surface them).