From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: feedback request for new package: eglot-hierarchy --- show call hierarchy Date: Tue, 03 Dec 2024 15:46:49 +0100 Message-ID: References: <79a32dee-25a6-4af1-bf5d-54e259bf0e4a@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11373"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Harald Kirsch Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 03 15:47:52 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tIUBs-0002nm-0G for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Dec 2024 15:47:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIUAz-0002Gs-9w; Tue, 03 Dec 2024 09:46:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIUAx-0002Gc-GS for emacs-devel@gnu.org; Tue, 03 Dec 2024 09:46:55 -0500 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIUAv-0001d8-AZ for emacs-devel@gnu.org; Tue, 03 Dec 2024 09:46:55 -0500 Original-Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-385e1f3f2a6so2488583f8f.3 for ; Tue, 03 Dec 2024 06:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733237211; x=1733842011; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=6v+GEfLRU4xLBUXy02a1rPWmja0BRrh/gO+bx6KmZnw=; b=l6PXmCgzpLST5KXqGqS0HMEvXh4g2SG26zrg33lM5GJNaq10ffuEAb1wWUc2MOHJpF rWXufatoNU7kUSvEoRUJNqs2d9W++eJK+wekRd+2P9qUDrNESKG3DvuBUYEAs1V0eblA GCKmmt42J4m4DiImjpQE8Y7LSqk7bcCZ9jalQMU+38B5JC6NF0jcj4KuiokFmkiJKOsA vXiGxuuayDs/r1J/+yEGdyAJ206jsWXuANBBy9HnoS9HefPFP31AwNd5KGtbZGOIXFQ8 hYulr8MPasNWLqq9Xpe7PLW0j2NdxNE2NZkxeG0ZfG4xRGfn6Hve10aG9tD8lkRXPOlH Vvxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733237211; x=1733842011; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6v+GEfLRU4xLBUXy02a1rPWmja0BRrh/gO+bx6KmZnw=; b=UxpEx3f2QGkD+nXKts1gDYoZOzEmA5UhCX78MEfFOTOK983W8LFFViAA2JjAZAFb9F bp+UVr7rGISLuKEN3SL04EKiyL/x8A3it62lo7/YCbajZjCA6WlNYEU+9JzjyvzC4Wkg wsETKVSI2qaKa9SBO/nQN9sH3U7SdHpwqWXQEs7mLuUU94Qw3yKq43PYGj7To4ScrIT1 Nn63wjaIGLhVHbB8owm0IWbRT/PXUqcymbp61FdsQpv+gpT4goBCcbfgNBAkDVfzmxaC aE1M3+uLqAMgpxcTsa3bObYxqKuLgB/Dnfacj3L3e8jIPFvRyUjnVdm1zMxUJVvXy2NQ Z7Zg== X-Gm-Message-State: AOJu0YyYe02cZ/U67v1LwdCJnC3nF9PPf+d6PwJoQ5fQkkU60i+vogiP MqS2FuJozRV6tw+0fDWNd6n8KQlzIdnUr+n+4qXaNDGHu8SYYg27NHpV0g== X-Gm-Gg: ASbGncsgHo/wjomXbGyvzZu5lS8v0pbtzSpki8cHbdl/feGMheDzUeN96nIi9IoT345 kazgb3XUsc30mInNb1s7IiSyOAQ7OfrqbN/PJd7eXisUHeZ1FnqjdWPE3f6+SuCGVZZIVCq+pTz 4P9jbP3SgVLX/BLQdhUkL2RMHqBUPlWl0cwu2PIV0vkc4QWTeIvLZHRVUU/bPlwSHyunQfajtHm H3Tl+A0VB+ZSwbIrGWxDTsBRZRBH5orXrT4D1APPyMpxd6m5DGj+BV6g4ZN2GeUe3vVzTv0GV1O 2HV5TMUR8CW3V3Hin7OClcttQeMvpGTuxQOqLeOQ2fl5eZHv9CQpwHD/0Nc= X-Google-Smtp-Source: AGHT+IHsIct5B87UgCCL9xWF+F2210NKWRk5HFz+RpPRS3qSX01bPl+ur0NDNDHKKSUPOwWEV3EZOg== X-Received: by 2002:a5d:5986:0:b0:382:4115:1ccb with SMTP id ffacd0b85a97d-385fd3cd078mr2455833f8f.7.1733237211053; Tue, 03 Dec 2024 06:46:51 -0800 (PST) Original-Received: from pro2 (p200300e0b74ffd00f86e70adfa453283.dip0.t-ipconnect.de. [2003:e0:b74f:fd00:f86e:70ad:fa45:3283]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385dea1e4ebsm13423840f8f.1.2024.12.03.06.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 06:46:50 -0800 (PST) In-Reply-To: <79a32dee-25a6-4af1-bf5d-54e259bf0e4a@gmx.de> (Harald Kirsch's message of "Tue, 3 Dec 2024 12:49:29 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=gerd.moellmann@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325990 Archived-At: Harald Kirsch 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!