How fanaticpythoner/better-todo-tree works
Better Todo Tree is a VS Code extension that finds configured TODO-style tags across a workspace, presents matches in a tree, and highlights them in open files. Its main runtime is coordinated by the extension entry point, which integrates workspace search, result handling, tree views, and editor decorations. Detection also supports language-specific comment patterns and embedded documents; notebook scanning and legacy-setting migration are documented capabilities. The graph follows documented workflows and visible source references; unsampled modules are included where the README establishes their role, without assuming their internal call wiring.
Main entry points: extension.js Extension Controller · detection.js Tag Detection · embeddedDocuments.js Embedded Documents · config.js Configuration
Components 23
Extension Runtime
- Extension Controller
src/extension.js - Notebook Scanning
src/notebooks.js - Settings Snapshot
src/runtime/settingsSnapshot.js - Document Scan Cache
src/runtime/documentScanCache.js
Search and Detection
- Workspace Search
src/ripgrep.js - Tag Detection
src/detection.js - Regex Engine
src/regexEngine.js - Regex Registry
src/regexRegistry.js - Embedded Documents
src/embeddedDocuments.js - HTML-like Parser
src/htmlLikeEmbeddedDocumentParser.js
Results and Display
- Search Results
src/searchResults.js - Todo Tree View
src/tree.js - Editor Highlights
src/highlights.js - Tree and Gutter Icons
src/icons.js
Settings and Language
- Configuration
src/config.js - Setting Migration
src/extensionIdentity.js - Tag Attributes
src/attributes.js - Language Configuration
src/customLanguageConfiguration.js - Comment Pattern Catalog
src/commentPatternCatalog.js - Language Pattern Resolver
src/commentPatternLanguageResolver.js
Other components
- VS Code User
- VS Code API
- ripgrep
Connections 27
- VS Code User → Extension Controller: uses extension
README.md - Extension Controller → VS Code API: registers features
src/extension.js - Extension Controller → Workspace Search: searches workspace
src/extension.js - Workspace Search → ripgrep: runs searches
src/ripgrep.js - Extension Controller → Tag Detection: normalizes matches
src/extension.js - Tag Detection → Regex Engine: uses regex tools
src/detection.js - Tag Detection → Embedded Documents: scans embedded content
src/detection.js - Embedded Documents → HTML-like Parser: uses parser
src/embeddedDocuments.js - Embedded Documents → Language Configuration: uses language rules
src/embeddedDocuments.js - Embedded Documents → Comment Pattern Catalog: resolves comment patterns
src/embeddedDocuments.js - Regex Engine → Regex Registry: uses registry
src/regexEngine.js - Tag Detection → Regex Registry: builds tag patterns
src/detection.js - Extension Controller → Search Results: manages matches
src/extension.js - Extension Controller → Todo Tree View: updates tree view
src/extension.js - Extension Controller → Editor Highlights: refreshes highlights
src/extension.js - Editor Highlights → Tag Detection: gets scan results
src/highlights.js - Todo Tree View → Tree and Gutter Icons: gets icons
src/tree.js - Extension Controller → Notebook Scanning: scans notebooks
src/extension.js - Extension Controller → Settings Snapshot: builds settings snapshot
src/extension.js - Extension Controller → Document Scan Cache: caches document scans
src/extension.js - Extension Controller → Configuration: initializes settings
src/extension.js - Configuration → Setting Migration: resolves setting namespace
src/config.js - Configuration → Tag Attributes: uses tag attributes
src/config.js - Extension Controller → Language Pattern Resolver: creates language resolver
src/extension.js - Language Pattern Resolver → Comment Pattern Catalog: uses pattern catalog
src/commentPatternLanguageResolver.js - VS Code User → Todo Tree View: opens matching file
README.md - VS Code User → Editor Highlights: views highlights
README.md