* eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
@ 2024-12-10 12:29 Harald Kirsch
2024-12-10 13:32 ` Gabriel Santos
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Harald Kirsch @ 2024-12-10 12:29 UTC (permalink / raw)
To: emacs-devel
This shows a call hierarchy as a foldable tree, unfolded on demand.
Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
got a significant update with bug fixes, enhancements and code improvements.
I test this with eglipse-jdts (Java) and tsc (TypeScript).
https://codeberg.org/harald/eglot-supplements#call-hierarchy
Feedback welcome.
Harald
--
HaraldKi@nrw.social
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
2024-12-10 12:29 eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy) Harald Kirsch
@ 2024-12-10 13:32 ` Gabriel Santos
2024-12-10 14:44 ` Gerd Möllmann
2024-12-11 6:05 ` Filippo Argiolas
2 siblings, 0 replies; 8+ messages in thread
From: Gabriel Santos @ 2024-12-10 13:32 UTC (permalink / raw)
To: emacs-devel; +Cc: Harald Kirsch
Good work Harald, patient to see what others may have to say here.
Em 10 de dezembro de 2024 09:29:41 BRT, Harald Kirsch <pifpafpuf@gmx.de> escreveu:
>This shows a call hierarchy as a foldable tree, unfolded on demand.
>
>Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
>got a significant update with bug fixes, enhancements and code improvements.
>
>I test this with eglipse-jdts (Java) and tsc (TypeScript).
>
>https://codeberg.org/harald/eglot-supplements#call-hierarchy
>
>Feedback welcome.
>
>Harald
>
>--
>HaraldKi@nrw.social
-- Gabriel Santos
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
2024-12-10 12:29 eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy) Harald Kirsch
2024-12-10 13:32 ` Gabriel Santos
@ 2024-12-10 14:44 ` Gerd Möllmann
2024-12-11 10:07 ` Harald Kirsch
2024-12-11 6:05 ` Filippo Argiolas
2 siblings, 1 reply; 8+ messages in thread
From: Gerd Möllmann @ 2024-12-10 14:44 UTC (permalink / raw)
To: Harald Kirsch; +Cc: emacs-devel
Harald Kirsch <pifpafpuf@gmx.de> writes:
> This shows a call hierarchy as a foldable tree, unfolded on demand.
>
> Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
> got a significant update with bug fixes, enhancements and code improvements.
>
> I test this with eglipse-jdts (Java) and tsc (TypeScript).
>
> https://codeberg.org/harald/eglot-supplements#call-hierarchy
>
> Feedback welcome.
Major improvement, thanks Harald!
I have only one minor wish: could you bind TAB like RET? I think things
like profiler-report do that, too.
Any plans for the other direction, i.e. functions called from another
function?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
2024-12-10 12:29 eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy) Harald Kirsch
2024-12-10 13:32 ` Gabriel Santos
2024-12-10 14:44 ` Gerd Möllmann
@ 2024-12-11 6:05 ` Filippo Argiolas
2024-12-11 10:36 ` Harald Kirsch
2 siblings, 1 reply; 8+ messages in thread
From: Filippo Argiolas @ 2024-12-11 6:05 UTC (permalink / raw)
To: Harald Kirsch, emacs-devel
Harald Kirsch <pifpafpuf@gmx.de> writes:
> This shows a call hierarchy as a foldable tree, unfolded on demand.
>
> Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
> got a significant update with bug fixes, enhancements and code improvements.
>
> I test this with eglipse-jdts (Java) and tsc (TypeScript).
>
> https://codeberg.org/harald/eglot-supplements#call-hierarchy
>
> Feedback welcome.
Thanks Harald, love it!
Seems to work with clangd too if you want to add it to the list of
supported servers. Let me know if you want me to test something
specific.
How about an option to unfold the tree by default? I was testing on a
small project, probably it gets quite bigger on large projects and
it's better to leave it folded?
Not sure if it's a clangd thing, I noticed that when I request the call
hierarchy on anything other than a function call or declaration I get a
"Error running timer: (args-out-of-range [] 0)". Maybe it could be
handled more nicely? Not sure it's something to notify the user about,
guess silently doing nothing would be fine.
Also, when I get to a leaf in the tree it shows with the '+' prefix,
when expanded it becomes '-' but there is nothing to expand so it just
changes the prefix. Maybe the leaf nodes should be made non-expandable?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
2024-12-10 14:44 ` Gerd Möllmann
@ 2024-12-11 10:07 ` Harald Kirsch
2024-12-11 11:01 ` Gerd Möllmann
0 siblings, 1 reply; 8+ messages in thread
From: Harald Kirsch @ 2024-12-11 10:07 UTC (permalink / raw)
To: emacs-devel
Hi Gerd.
On 10.12.24 15:44, Gerd Möllmann wrote:
> Harald Kirsch <pifpafpuf@gmx.de> writes:
>
>> This shows a call hierarchy as a foldable tree, unfolded on demand.
>>
>> Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
>> got a significant update with bug fixes, enhancements and code improvements.
>>
>> I test this with eglipse-jdts (Java) and tsc (TypeScript).
>>
>> https://codeberg.org/harald/eglot-supplements#call-hierarchy
>>
>> Feedback welcome.
>
> Major improvement, thanks Harald!
>
> I have only one minor wish: could you bind TAB like RET? I think things
> like profiler-report do that, too.
Easy enough. I realize magit uses TAB too to unfold things.
https://codeberg.org/harald/eglot-supplements/issues/14
> Any plans for the other direction, i.e. functions called from another
> function?
Now we have incoming calls. There are also outgoing calls as well as
subtype and supertype hierarchies, all with a very similar API. I have
some code already for supertype. So ongoing. :-)
https://codeberg.org/harald/eglot-supplements/issues/13
Harald
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
2024-12-11 6:05 ` Filippo Argiolas
@ 2024-12-11 10:36 ` Harald Kirsch
2024-12-11 12:14 ` Filippo Argiolas
0 siblings, 1 reply; 8+ messages in thread
From: Harald Kirsch @ 2024-12-11 10:36 UTC (permalink / raw)
To: Filippo Argiolas, emacs-devel
Hi Filippo.
On 11.12.24 07:05, Filippo Argiolas wrote:
> Harald Kirsch <pifpafpuf@gmx.de> writes:
>
>> This shows a call hierarchy as a foldable tree, unfolded on demand.
>>
>> Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
>> got a significant update with bug fixes, enhancements and code improvements.
>>
>> I test this with eglipse-jdts (Java) and tsc (TypeScript).
>>
>> https://codeberg.org/harald/eglot-supplements#call-hierarchy
>>
>> Feedback welcome.
>
> Thanks Harald, love it!
>
> Seems to work with clangd too if you want to add it to the list of
> supported servers. Let me know if you want me to test something
> specific.
A major pain point was buffer/window/frame handling. If you want to get
creative, messing with the window/frames of the hierarchy and the source
code to see what fails would be nice.
> How about an option to unfold the tree by default? I was testing on a
> small project, probably it gets quite bigger on large projects and
> it's better to leave it folded?
I have no recursion-test yet. In any case I would probably add a custom
variable for the max depth to unfold initially. (Classic shift of
responsibility to the user :-) But this should not be difficult.
https://codeberg.org/harald/eglot-supplements/issues/11
> Not sure if it's a clangd thing, I noticed that when I request the call
> hierarchy on anything other than a function call or declaration I get a
> "Error running timer: (args-out-of-range [] 0)". Maybe it could be
> handled more nicely? Not sure it's something to notify the user about,
> guess silently doing nothing would be fine.
Hmmpf, I thought I had this fixed. But server's seem to be creative of
how to provide a null result. I'll check and may contact you again for
details or a test.
https://codeberg.org/harald/eglot-supplements/issues/17
https://codeberg.org/harald/eglot-supplements/issues/15
> Also, when I get to a leaf in the tree it shows with the '+' prefix,
> when expanded it becomes '-' but there is nothing to expand so it just
> changes the prefix. Maybe the leaf nodes should be made non-expandable?
Indeed. But: nodes are only expanded on demand, so on first try, there
is no easy way around. But clearly, once known, the leaf node should be
distinguished.
https://codeberg.org/harald/eglot-supplements/issues/16
Thanks for the feedback
Harald
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
2024-12-11 10:07 ` Harald Kirsch
@ 2024-12-11 11:01 ` Gerd Möllmann
0 siblings, 0 replies; 8+ messages in thread
From: Gerd Möllmann @ 2024-12-11 11:01 UTC (permalink / raw)
To: Harald Kirsch; +Cc: emacs-devel
Harald Kirsch <pifpafpuf@gmx.de> writes:
> Hi Gerd.
>
> On 10.12.24 15:44, Gerd Möllmann wrote:
>> Harald Kirsch <pifpafpuf@gmx.de> writes:
>>
>>> This shows a call hierarchy as a foldable tree, unfolded on demand.
>>>
>>> Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
>>> got a significant update with bug fixes, enhancements and code improvements.
>>>
>>> I test this with eglipse-jdts (Java) and tsc (TypeScript).
>>>
>>> https://codeberg.org/harald/eglot-supplements#call-hierarchy
>>>
>>> Feedback welcome.
>>
>> Major improvement, thanks Harald!
>>
>> I have only one minor wish: could you bind TAB like RET? I think things
>> like profiler-report do that, too.
>
> Easy enough. I realize magit uses TAB too to unfold things.
Thanks! Right, Magit does that also, on sections for example. Didn't
think of that.
>
> https://codeberg.org/harald/eglot-supplements/issues/14
>
>> Any plans for the other direction, i.e. functions called from another
>> function?
>
> Now we have incoming calls. There are also outgoing calls as well as
> subtype and supertype hierarchies, all with a very similar API. I have
> some code already for supertype. So ongoing. :-)
>
> https://codeberg.org/harald/eglot-supplements/issues/13
>
Looking forward to this!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
2024-12-11 10:36 ` Harald Kirsch
@ 2024-12-11 12:14 ` Filippo Argiolas
0 siblings, 0 replies; 8+ messages in thread
From: Filippo Argiolas @ 2024-12-11 12:14 UTC (permalink / raw)
To: Harald Kirsch, emacs-devel
Harald Kirsch <pifpafpuf@gmx.de> writes:
> Hi Filippo.
>
> On 11.12.24 07:05, Filippo Argiolas wrote:
>> Harald Kirsch <pifpafpuf@gmx.de> writes:
>>
>>> This shows a call hierarchy as a foldable tree, unfolded on demand.
>>>
>>> Through nice feedback here, on codeberg and on @HaraldKi@nrw.social, it
>>> got a significant update with bug fixes, enhancements and code improvements.
>>>
>>> I test this with eglipse-jdts (Java) and tsc (TypeScript).
>>>
>>> https://codeberg.org/harald/eglot-supplements#call-hierarchy
>>>
>>> Feedback welcome.
>>
>> Thanks Harald, love it!
>>
>> Seems to work with clangd too if you want to add it to the list of
>> supported servers. Let me know if you want me to test something
>> specific.
>
> A major pain point was buffer/window/frame handling. If you want to get
> creative, messing with the window/frames of the hierarchy and the source
> code to see what fails would be nice.
Will play with it a little and let you know if I find anything!
>> How about an option to unfold the tree by default? I was testing on a
>> small project, probably it gets quite bigger on large projects and
>> it's better to leave it folded?
>
> I have no recursion-test yet. In any case I would probably add a custom
> variable for the max depth to unfold initially. (Classic shift of
> responsibility to the user :-) But this should not be difficult.
>
> https://codeberg.org/harald/eglot-supplements/issues/11
>
Right, I didn't think about recursion and didn't realize the tree is
built as you traverse it. A max depth limit sounds like a nice solution :-)
>> Not sure if it's a clangd thing, I noticed that when I request the call
>> hierarchy on anything other than a function call or declaration I get a
>> "Error running timer: (args-out-of-range [] 0)". Maybe it could be
>> handled more nicely? Not sure it's something to notify the user about,
>> guess silently doing nothing would be fine.
>
> Hmmpf, I thought I had this fixed. But server's seem to be creative of
> how to provide a null result. I'll check and may contact you again for
> details or a test.
>
> https://codeberg.org/harald/eglot-supplements/issues/17
> https://codeberg.org/harald/eglot-supplements/issues/15
Thanks will follow the issues there. Feel free to contact me anytime.
>> Also, when I get to a leaf in the tree it shows with the '+' prefix,
>> when expanded it becomes '-' but there is nothing to expand so it just
>> changes the prefix. Maybe the leaf nodes should be made non-expandable?
>
> Indeed. But: nodes are only expanded on demand, so on first try, there
> is no easy way around. But clearly, once known, the leaf node should be
> distinguished.
>
> https://codeberg.org/harald/eglot-supplements/issues/16
Understood, for some reason in my mind all the tree was built at once
and represented as collapsed. Now current behaviour makes more sense!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-12-11 12:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 12:29 eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy) Harald Kirsch
2024-12-10 13:32 ` Gabriel Santos
2024-12-10 14:44 ` Gerd Möllmann
2024-12-11 10:07 ` Harald Kirsch
2024-12-11 11:01 ` Gerd Möllmann
2024-12-11 6:05 ` Filippo Argiolas
2024-12-11 10:36 ` Harald Kirsch
2024-12-11 12:14 ` Filippo Argiolas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).