How t0ks1k24/vscode-file-marks works
File Marks Explorer is a VS Code extension for annotating files, folders, and individual lines with colours, tags, and notes. Users invoke mark commands from Explorer selections, editor context, keybindings, or the Command Palette; the extension resolves targets, updates persistent marks, and renders them in the Explorer and editor gutter. Major capabilities also include listing and opening marks, import/export, pruning and clearing, edit-aware line marks, shared workspace storage, and Git-decoration priority. The graph reflects documented features where command implementations were not sampled; those connections are omitted when ownership is uncertain.
Main entry points: markStore.js Mark store · extension.js Extension entry · index.js Command registration · marks.js File mark commands
Components 20
Mark Commands
- Command registration
src/commands/index.js - File mark commands
src/commands/marks.js - Line mark commands
src/commands/lines.js - List and open
src/commands/list.js - Mark maintenance
src/commands/maintenance.js - Target resolution
src/targets.js - Mark argument parsing
src/markArgs.js
Mark State
- Mark store
src/markStore.js - Storage target and codecs
src/storage.js - Path key handling
src/keys.js - Workspace key safety
src/workspaceKeys.js
Mark Rendering
- Explorer decorations
src/decorationProvider.js - Line decorations
src/lineDecorations.js - Decoration priority
src/decorationPriority.js
Extension Lifecycle
- Extension entry
src/extension.js
Other components
- VS Code user
- VS Code APIs
- Global profile storage
- Workspace marks file
- Git decorations
Connections 35
- VS Code user → VS Code APIs: invokes commands
- VS Code APIs → Extension entry: activates extension
- Extension entry → Storage target and codecs: resolves storage
- Extension entry → Mark store: loads marks
- Extension entry → Command registration: registers commands
- Extension entry → Explorer decorations: creates provider
- Extension entry → Line decorations: creates renderer
- Extension entry → Decoration priority: manages priority
- Command registration → File mark commands: registers handlers
- Command registration → Line mark commands: registers handlers
- Command registration → List and open: registers handler
- Command registration → Mark maintenance: registers handlers
- File mark commands → Target resolution: resolves targets
- File mark commands → Mark argument parsing: builds patches
- File mark commands → Mark store: updates marks
- Line mark commands → Mark store: updates line marks
- List and open → Mark store: reads marks
- Mark maintenance → Mark store: maintains marks
- Mark maintenance → VS Code APIs: reads and writes files
- Target resolution → VS Code APIs: queries selection
- Mark store → Storage target and codecs: uses storage target
- Storage target and codecs → Workspace key safety: validates workspace keys
- Storage target and codecs → Path key handling: uses URI keys
- Mark store → Global profile storage: reads and writes
- Mark store → Workspace marks file: reads and writes
- Extension entry → Mark store: watches external changes
- Mark store → Explorer decorations: notifies mark changes
- Mark store → Line decorations: notifies mark changes
- Explorer decorations → VS Code APIs: provides Explorer decorations
- Line decorations → VS Code APIs: draws gutter stripes
- Extension entry → Line decorations: tracks document edits
- Extension entry → Decoration priority: watches Git state
- Decoration priority → Git decorations: reasserts priority
- Decoration priority → VS Code APIs: sets decoration order
- List and open → VS Code APIs: opens or reveals targets