trouble.nvim icon indicating copy to clipboard operation
trouble.nvim copied to clipboard

Add support for lsp_incoming_calls provider

Open monopoly-db opened this issue 3 years ago • 3 comments

It'll be very useful to cycle through incoming calls by directly opening lsp_incoming_calls results in Trouble rather than having to do so by going to Telescope first.

monopoly-db avatar Oct 19 '22 16:10 monopoly-db

This would be great to see. Incoming and outgoing as well. Love trouble!

natdm avatar Jan 31 '23 15:01 natdm

Almost opened another feature request, requesting "call hierarchy". Then I remembered that the technical name for it in LSP world is incoming_calls, and found this :) So I'll add this comment here, both to show interest in this feature, and for the "call hierarchy" keyword to show up in search.

shahamran avatar May 19 '24 08:05 shahamran

I may add this to v3.

folke avatar May 19 '24 08:05 folke

Added!

folke avatar May 30 '24 11:05 folke

Awesome! thanks!

shahamran avatar May 30 '24 12:05 shahamran

Hi @folke, I tried it out, and it's not exactly what I expected from a call-hierarchy UI.

In such UI I expect the incoming calls entries to recursively have their parents in the tree as well. See: https://github.com/marcomayer/calltree.nvim. This way you could easily see the "call stack" of a function you're inspecting, and quickly jump to any of its ancestors.

I thought that since trouble is a tree UI, it'd be a good fit for such use-case. What do you think?

shahamran avatar Jun 01 '24 06:06 shahamran