unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Harald Kirsch <pifpafpuf@gmx.de>
To: Filippo Argiolas <filippo.argiolas@gmail.com>, emacs-devel@gnu.org
Subject: Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy)
Date: Wed, 11 Dec 2024 11:36:18 +0100	[thread overview]
Message-ID: <d107b99c-0408-472b-b6a8-4ac4dddaa9d8@gmx.de> (raw)
In-Reply-To: <m2ldwmhhz5.fsf@gmail.com>

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




  reply	other threads:[~2024-12-11 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-12-11 12:14     ` Filippo Argiolas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d107b99c-0408-472b-b6a8-4ac4dddaa9d8@gmx.de \
    --to=pifpafpuf@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=filippo.argiolas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).