From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Harald Kirsch Newsgroups: gmane.emacs.devel Subject: Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy) Date: Wed, 11 Dec 2024 11:36:18 +0100 Message-ID: References: <43440606-4506-41c2-a608-18a910376d8e@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24645"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Filippo Argiolas , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 11 11:37:12 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 1tLK5g-0006Eq-Bv for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Dec 2024 11:37:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLK4z-0000eu-Qg; Wed, 11 Dec 2024 05:36:29 -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 1tLK4x-0000eE-CS for emacs-devel@gnu.org; Wed, 11 Dec 2024 05:36:27 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLK4v-0001z2-FY for emacs-devel@gnu.org; Wed, 11 Dec 2024 05:36:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1733913382; x=1734518182; i=pifpafpuf@gmx.de; bh=lOUBV7e/3C9rEZNncxzWBBpDmXXZ1pm41ljWJ6QpD7A=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=BQiLfzvOm00cVvXp5jOipwBALTW4UIUZqGGsru1jgTjAxSXjl2hk7n4AnAKzDPmG 7hgdp6nG4ycsvKcj8FWVcIba8scZjbEcrCIzFqib5RNk6mqAxn3+Cla5x+YOWQRlE 4eb+gVHqVhveVpS/nJSk1/Cer8otw15Fg39IC7MqsVD25QAyZumdekEVWyxWqp+3A vvimvRtIkdUUPvgM39HOjQUjNwBbEQ9ahLlQ6IuPWjhkskeyF7cczis2PqVGCMXWA REtYZFkYafpEkis0Oq6UIrDvL71efx2gqDNsrOTkL1H3vRzNV83PbJehQZCK03saN uD1rYg9xrGFgKSPqLw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.55.104] ([79.247.82.79]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MHoNC-1tRMDT32og-0076rr; Wed, 11 Dec 2024 11:36:21 +0100 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:VZHFz570bMA+NgX2/cT/sbgP0rwtHxL2FZ3G/zmYYfpmTeIvbVw rzeinGeqAxPODw2LkGubYhgN2hlI1xaVe46zZwU/hSRHEGYIk67e5J66cVOHFoSkgmlK9Iy n89rYGTHcknHfdepTH1G32S1O0mcJGeelDBgJBkqKnuXVWG7K7XDfcFeGnMI3LoFLJFrRao N7HhB9+IZH8Ph8OhbHlvw== UI-OutboundReport: notjunk:1;M01:P0:TTpIRJMBQKA=;IX4MAvzJ2gGxCuUD32lrDLkvIFp SpSa/e92KlTGJt2kptthc1/YpFN12kU8QYmo/WeGwsuIbek7PjuBTDQC2vNSXVZua0avbdcfa u2QabzgozrWo+qQxiALDxntQYBKKwNxlwE+AlebQfuLImPj7874HHvBKCNIzcmf47rnFmH0r8 z7susf3DYty9NSgbU0LF53gjs2PGsj5d9AO0xpcbkuls7RBEzKCAi64EydhrQMnidRsqkiZ+D c6FPaMOwcwXBvQcBN4jrCzCQGmqpluHfXAZSJ1I4oocCyW1AYyNwln7By/wGTRbTgO69UxfCh i1I/kZnVyxjCl3NVDXbqqaL7NhxjXhc4sz2lr2RxFlY8wfzPWbH1k2CydphUnuwkMd3mC67+a 0Q47+NDhweaf9oXQqOtI6wxgEoaMfKs8f5S0z3tQx743hNppOyi2rQukTqj7segxf7nn0Iym+ jKGKA9Y5E68oNPq7ZhtDkTKRDxf5Uq9HazIo/Kq1Tk7b/rA5fYxT+Qejmy144eN7zGjAD6Wkc fOuHVpGT7iHNRG+3n9IFuEm6W9hHEImTbtxQgNOPf4Nsr6zcb1jrlPwGNe7gKRTH/EC4Igq3t m0CyqyhRbmd3JBZv8bfERShiAqHfTI9n/BkVv4r9E44R8UJWqFFb30dxuOv/ePIiiE7iTX2rt Brx+oZTta/m6M4wrzPsjAxb5nDRj0+dOu8CLV0s52X93Gvhkb+ZdR7sKYddY+I9Tt1RrJCGPw ZjWkQ0lPegRzSYViaA+YZ2e45Fg6ewcJ0EiloD6g1BE2WTPYbJopCwWkAYtXa2nBy3tNZdzJ Received-SPF: pass client-ip=212.227.17.20; envelope-from=pifpafpuf@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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:326338 Archived-At: Hi Filippo. On 11.12.24 07:05, Filippo Argiolas wrote: > Harald Kirsch 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 improvem= ents. >> >> 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