HACKER Q&A
📣 Nezteb

In-editor visual mind map/graph tool for code?


I'd love a tool that lets me manually create maps/graphs between files/modules/functions in code and be able to jump between nodes. What would be even cooler is LSP support so that if code changed, the tool would be able to keep the map/graph up-to-date.

So far the closest thing I can find is a VS Code extension: https://github.com/Pjaerr/Code-Flow-Extension

Apparently there also used to be a tool/service called "Grok" that is now dead and the original domain redirects to spam: https://web.archive.org/web/20210812070223/https://www.trygrok.com/

Here's an old HN thread about Grok, which at least shows that a tool like this would be useful to others: https://news.ycombinator.com/item?id=28150169

Has anyone come across a tool like this recently?


  👤 sargstuff Accepted Answer ✓
Slightly off topic & very resource intensive diy approach without using an IDE:

Take advantage of an editor's use of on disk file as a buffer[0]. Monitor the editor file buffer for changes[1]. Trigger regeneration of a map/graph update & redisplay changes[2] in different non-editor window.

Where [2]'s configuration could be done to display editor buffer stats & how relates to other things beyond the current buffer.

Selecting / clicking on [2] node displays ctag buffer reference to jump to / sends ctag to named pipe editor monitoring.

[0] : https://stackoverflow.com/questions/71822798/what-exactly-ar...

[1] : watchdog : https://pypi.org/project/watchdog/

[2] : emerge-vis : https://github.com/glato/emerge


👤 sargstuff
Some HN discussed software / software plug-ins use "tree sitter" as a back end in order to create/generate source maps/graphs.

searching on editor of choice (aka emacs) and term "treequery" works better for general search engine.


👤 sargstuff
emacs. LSP (under editor such as emacs[0]) provides the context/way for being able to define a specific way to parse specifics of a language in order to add/define emacs hooks/jump points for a given language definition of nodes/files/modules/functions)

[0] : https://www.masteringemacs.org/article/tree-sitter-complicat...

https://consensys.net/diligence/blog/2019/10/solidity-visual...

https://www.typefox.io/blog/using-sprotty-in-vs-code-extensi...


👤 zknill
I built https://packagemap.co for working with Java code. It builds maps of your packages.

If you try it out, I'd love to get your feedback.