Skip to content

burner972021/mycelium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mycelium πŸ„

Mycelium is a VS Code extension that provides a live graph view of symbols and their relationships in your code. It automatically extracts nodes and edges from your open files and displays them in an interactive, DAG-style graph.

What separates Mycelium from VS code's built-in outline viewer is its ability to scan and display symbols from all files in your workspace/folder. Additionally, the symlinks are displayed as a graph, for your larping pleasure.

Features 🌿

  • Workspace-wide symbol graph β€” every source file and its symbols, live in the sidebar
  • Inferred reference edges β€” dashed call/usage links between symbols on top of the containment tree; toggle with ⇄ Refs
  • Hover for details β€” point at any node or edge to see its type, location, and connections
  • Click-to-focus drill-down β€” tap a node to zoom into its 1–2 degree neighbourhood; background or Reset zooms out
  • Type filtering β€” colour-coded, theme-aware nodes/edges with a clickable legend to hide noisy types (All resets)
  • Layouts β€” fast force-directed Spread (default) plus left-to-right / top-down trees
  • Configurable β€” scan limit, include/exclude globs, and reference inference are all settings
  • Export & controls β€” PNG export and Refresh / Fit / Layout, in the toolbar and command palette
  • Works offline β€” graph libraries bundled, no network required

Usage πŸš€

Open the Mycelium view from the activity bar. With a folder open, the graph scans every source file in the workspace and groups each file's symbols beneath a file node; it rescans on save (and whenever you change a Mycelium setting). With no folder open, it instead shows the symbols of the active file and follows you as you switch editors. Use the toolbar to Refresh (rescan), Fit (recentre), pick a Layout, toggle ⇄ Refs, or Export PNG. The Refresh and Export actions are also available from the command palette (Mycelium: …).

Reference edges: beyond the fileβ†’symbol containment tree, Mycelium overlays dashed edges where one symbol calls or uses another (inferred from your language server). Toggle them with ⇄ Refs, or turn the (more expensive) inference off in settings. Hover any node or edge for a details popup.

Decluttering large graphs: click a type in the legend to hide/show all nodes of that type (e.g. turn off Variable and Constant to see just the structure); All restores everything. The Layout dropdown offers a left-to-right or top-down tree, plus a fast force-directed Spread view (the default) that fans nodes out in 2D instead of stacking them in a line. The view also clamps how far it zooms out so nodes stay visible on very large workspaces β€” use scroll/drag to pan.

Settings βš™οΈ

Setting Default What it does
mycelium.maxFiles 200 Max source files scanned for the graph.
mycelium.include "" Glob of files to include (empty = built-in source glob).
mycelium.exclude "" Extra exclude glob, merged with the built-in excludes.
mycelium.inferReferences true Overlay inferred call/reference edges.
mycelium.maxRefSymbols 400 Cap on reference queries (0 disables inference).

To-do βœ…

  • Richer edge inference (imports, inheritance/implements)
  • Per-language tuning of which symbol kinds are shown by default
  • Persisting layout/filter preferences across sessions

Development πŸ› 

npm install
npm run watch     # incremental build; or press F5 in VS Code to launch the Extension Host
npm test          # integration tests (needs a display β€” use `xvfb-run -a npm test` on headless Linux)

The webview libraries (cytoscape / dagre) are copied from node_modules into media/vendor by the build step, so no network access is needed at runtime.

Release Notes πŸ“–

Ver. 0.9.0 (beta) β€” feature-complete preview ahead of 1.0: reference-edge inference, hover details, configurable scanning, faster updates, and Marketplace packaging. See the to-do for what's left before 1.0 and the CHANGELOG for details.

Changelog πŸ“

Latest changes documented below. For detailed view, see CHANGELOG.MD.

About

πŸ„ Lightweight cross-file symbol graph view extension for VS code.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors