chanhx / crabviz

🦀 A LSP-based interative call graph generator
Apache License 2.0
674 stars 22 forks source link

Call Depth [Feature Request] #34

Open newcomertv opened 3 months ago

newcomertv commented 3 months ago

Hey, First of all thanks for making this awesome tool!

I remember visiting this tool a year of two ago and being blown away by what was already achieved. It was still a little too clunky to get good use out of and when I came back and saw how far this has come I'm truly impressed.

[Suggestion]

It would be cool if we could configure a "call depth" for the selected function graph.

Currently when selecting a node you can only see the direct predecessors and successors. It would be neet if we could configure this depth independently for each type (predecessor / successor).

How I imagine this could be implemented. There seems to be some kind of mechanism to lookup the two corresponding nodes by type when selecting an item. If we could repeat this selection n items we should have a path of depth n.

This is probably way harder than it looks though I thought it would be a worthwhile mention.

chanhx commented 2 months ago

I'm sorry for responding so late, and thank you for the kind words and the suggestion!

This is a good idea. We can generate a graph with no depth limit, and then adjust the depth as needed and refresh the graph.

I think it would not be too difficult but still a lot of work to do, so I may implement this feature after v0.5.0 is released.