From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Harald Kirsch <pifpafpuf@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: feedback request for new package: eglot-hierarchy --- show call hierarchy
Date: Tue, 03 Dec 2024 15:46:49 +0100 [thread overview]
Message-ID: <m2ser4zuw6.fsf@gmail.com> (raw)
In-Reply-To: <79a32dee-25a6-4af1-bf5d-54e259bf0e4a@gmx.de> (Harald Kirsch's message of "Tue, 3 Dec 2024 12:49:29 +0100")
Harald Kirsch <pifpafpuf@gmx.de> writes:
> Hi all,
>
>
> https://codeberg.org/harald/eglot-supplements#call-hierarchy
>
> has eglot-hierarchy.el which talks to a language server, requests the
> call hierarchy for the item at point and shows it as a simple tree in
> another buffer.
>
> Folding/unfolding the tree elements works for showing the respective
> code or jumping to it.
>
> So far it does only incoming calls. Depending on feedback I may look
> into outgoing calls as well as type hierarchies which look quite similar.
>
> I read over https://github.com/joaotavora/eglot/issues/614 but missed
> the link to https://github.com/dolmens/eglot-hierarchy . Just tried it
> and couldn't get it to work with eclipse-jdts or Typescript, so it seems
> either package needs more work :-)
>
> Feedback welcome.
>
> Harald
Hi Harald,
I've given it a try with Emacs' C code and clangd. Installation with
straight.el, in case it's useful for others:
(use-package eglot-supplements
:straight (:repo "https://codeberg.org/harald/eglot-supplements.git"
:branch "main" :files ("*.el"))
:init
(provide 'eglot-supplements)
:bind
(:map my-eglot-bindings
("c" . #'eglot-hierarchy-request-call-hierarchy)))
The :bind lets me use the hierarchy in C buffers with C-c e c. The
'provide' is a workaround to prevent an error when trying to load that
"package" which doesn't have a eglot-supplements.el.
Feedback so far:
- I get a "eglot-cthier" buffer, don't like that name much.
- The hierarchy buffer has key bindings for commands with prefix 'xx-'
defined in eglot-hierarchy.el.
- when I jump to some caller with SPC, it jumps the the line of the
function definition, not to where the call is. Don't know if that's
possible to implement, but I would find that much nicer.
So far so good, thanks!
prev parent reply other threads:[~2024-12-03 14:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 11:49 feedback request for new package: eglot-hierarchy --- show call hierarchy Harald Kirsch
2024-12-03 14:46 ` Gerd Möllmann [this message]
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=m2ser4zuw6.fsf@gmail.com \
--to=gerd.moellmann@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=pifpafpuf@gmx.de \
/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).