From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filippo Argiolas Newsgroups: gmane.emacs.devel Subject: Re: eglot-cthier.el --- show call hierarchy with Eglot (formally called eglot-hierarchy) Date: Wed, 11 Dec 2024 07:05:50 +0100 Message-ID: References: <43440606-4506-41c2-a608-18a910376d8e@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="18929"; mail-complaints-to="usenet@ciao.gmane.io" To: Harald Kirsch , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 11 07:06:49 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 1tLFs0-0004lu-Ob for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Dec 2024 07:06:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLFrG-0007o3-Pz; Wed, 11 Dec 2024 01:06:02 -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 1tLFrB-0007nh-RY for emacs-devel@gnu.org; Wed, 11 Dec 2024 01:05:58 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLFr9-0005Sh-VY for emacs-devel@gnu.org; Wed, 11 Dec 2024 01:05:57 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4361f664af5so1069935e9.1 for ; Tue, 10 Dec 2024 22:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733897153; x=1734501953; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=ncpnH0YxCi4RF581Tdv88hlQbYgmCegluyTF+ntd1yg=; b=WB21tufb+9BL91dEAhmIZ/GyTGWUCnvRiyqw/7SDlNLuwD9kcHhsaVeQM6stznLQxp GuvOcQcREartKKFtfnNzmGTbSLDztXH6isdx2Jlj6Up16m7ziddWu5fWbU5E52gc3knE gsAGUWzrM16IuvUPIlqqGoaxPh69gPIJ8atBqzlWRsdiGj9wHospWUdFxqTiEk9p1sM9 Km9INefvXLv7EAVs3WGUcRGYyPYikXIjdyuFiNtP+Nen7Fgee8N/KQp9ZN2uUkwmMRlN GjnAgQQFfUu4kcI8q2B7/SUtE4ZMIrpK3mJMvkJi+4Z5BTcHif5zVXp/HWRJZ2ftB5gE TJKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733897153; x=1734501953; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ncpnH0YxCi4RF581Tdv88hlQbYgmCegluyTF+ntd1yg=; b=huk2mdZ2HdFyvDOAlske/p+wOznZpi0gnfLeSMIAcVvkmkjtkszHmMxS2EfegPx0mw MHmr27Cd/oSStkDSLYlJsaUmVn/Mkcb7Jz2AQgBxpELD1IZaDlNOn3yyqEZJwswed345 ZuZnN4QkB/WYyVbD66N398Hk9cGpdPzqTUhCcW+mHyZtTEF0/AYG/O1oOoloMrkz4ssP vQ+PyHxV0+JHuvqZcq3pb/Cu1cHtOlmU5GmKxLeUz5NwXTeO2gMhLbazz+vK0HDYlWDd wOsN0/yZSdEWarVI+b5cAkfgwksF0Pg5WQRTOZ/bITpyrddb+7kjTMet90TMQGu+Cml7 lzKA== X-Forwarded-Encrypted: i=1; AJvYcCWuzDuKB1PtTcZzEWZ8MZOd2EtUo7GgXo9qpZ9T+HkbSIXMW5InuJRSc7B7NvucK17V/oA1ArdQMBumFw==@gnu.org X-Gm-Message-State: AOJu0YxyBv1eSlhK6+rmTiCWZbKiSwjtS+A/bmPnbmF0cAKpkmhK7AJE B0EYF+ADXUKkAX/E4ipP84Qh6M3xBQoeALMjhwd/reAK2llSFWOLCJLSOm2d X-Gm-Gg: ASbGncvw/UURcYXxs5lCgTqex9zEGHf/OX65D9FRwVoNSy+BvbM1UhQS6FkQtRvGvSc 1Y4kwUaxlYqXh7Ze4NcJ/PZCvuacYqq9XMKAa/w1bxU6cO4r6ua1oVSz1QSWmbixfUOLT2R6TpP Fd3kwyOaZUkiG3DNuRV3cuSwuDGdRY1585ipfH+RS+uOvAO62XKbXqYsjkIpEAIZA3Upb4k6F27 Tzfb61BbuJmdb4yUI7+fn+xJzN+SIs1XQaGGIcc5eKLT78y0Ox0WMVss2i5NYM= X-Google-Smtp-Source: AGHT+IEsIlyp40YBPO4lM31BllVHqFIhsiMIMjTsO/yDy5kat1DZWiTARBxSO0c6GOD2rLGyXAPvaQ== X-Received: by 2002:a5d:6d86:0:b0:385:e37a:2a56 with SMTP id ffacd0b85a97d-3864ced312dmr1098653f8f.52.1733897152558; Tue, 10 Dec 2024 22:05:52 -0800 (PST) Original-Received: from mba ([151.81.188.252]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434f981880csm94718745e9.44.2024.12.10.22.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 22:05:51 -0800 (PST) In-Reply-To: <43440606-4506-41c2-a608-18a910376d8e@gmx.de> Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=filippo.argiolas@gmail.com; helo=mail-wm1-x32a.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:326327 Archived-At: 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 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?