From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: feature/tree-sitter 908aab6144: Improve tree-sitter imenu for c-mode and js-mode Date: Sat, 12 Nov 2022 22:51:58 -0800 Message-ID: <81751DE8-3BCC-4D6E-8425-FB3F9CB2B06E@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29238"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Randy Taylor , "emacs-devel@gnu.org" To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 13 07:52:32 2022 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 1ou6r2-0007Qc-Ao for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Nov 2022 07:52:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ou6qc-0000wK-DQ; Sun, 13 Nov 2022 01:52:06 -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 1ou6qZ-0000vv-VV for emacs-devel@gnu.org; Sun, 13 Nov 2022 01:52:04 -0500 Original-Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ou6qY-0005lB-6p for emacs-devel@gnu.org; Sun, 13 Nov 2022 01:52:03 -0500 Original-Received: by mail-pf1-x434.google.com with SMTP id b185so8360568pfb.9 for ; Sat, 12 Nov 2022 22:52:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Um+yg2XUJVAtqYGwIc7pldj9ilMkTK0OzOQ/OYESUlI=; b=WZEVeoOwlrgvdsbOySzqRDKjemuG9TgfnVH2r3bjX0RQA0D9XGbe70nx8Oos7zug30 vZepYCarLeZNojb4AW0+ut+zXXzEPHqSZEetxrf2OKGvjAmN4H/Tb1w9974HD+ZfOs/5 C5MW7lxqqvVEeAOp6Y39MFbRtO/MJ02/AvUSemGbxRMoNPsRNT6vVG9mOSyDh9jEeINd wdXYeLo43oWSYPE65Xokh+NhV+zN/kWHAXHJckKVF/z2ij+r0fASXKF2RnkjhfHjk1Kb b37leOZQ2GmlDQQ1JTCtKBBhwZM6O5FWGttWwF1g5RxbFk03PSoiUUA3A/O+MU/NWpju 6h3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Um+yg2XUJVAtqYGwIc7pldj9ilMkTK0OzOQ/OYESUlI=; b=BULt+j+oksxIIczr5t1zVOTCc9T6hrHZNNC7PHM+Kwn3II0pgh1fTz2PH7/66k7/QE DH5LYx+cNvDbvirMRGDKgcx4o93V71yp1ZaM3iR4zL/M9WHH97r3m18rSkvuLKaKSZPU ZlvEVgDNTcOM7zAycMlrivt7BszpgwItYCYBPJHj5mS3zL27LsH9ID9oNQX8OvQfIVw+ 0/eelGAvP61lFBifcXXnyFAISnrP5ePgDiMc2XkgoLG0EjnP+XYs1vMPD+ri+654ELeZ k2SVbIHbpPbk5zBepz0kYUxyeyHn9e78d51xZZJQL4WtVA3Km5hvrZCquzEhEv9CgDKX ax7Q== X-Gm-Message-State: ANoB5pnsQuQBfso+N9lFkijAEULRysxxNV8XTAENk/NHNd9phMGACNZO k0UqCyfMvtKDL5fJjPon13s= X-Google-Smtp-Source: AA0mqf5UQXF/F1pghVdBqLGlbuzVGu6y1nWk3fVmGVDHo4T+MaEnetcXYzoeMdvpH41eHf3Hr2oYPg== X-Received: by 2002:a63:5c0a:0:b0:470:1186:de85 with SMTP id q10-20020a635c0a000000b004701186de85mr7504316pgb.609.1668322320057; Sat, 12 Nov 2022 22:52:00 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id x12-20020aa79acc000000b005385e2e86eesm4369517pfp.18.2022.11.12.22.51.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Nov 2022 22:51:59 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=casouri@gmail.com; helo=mail-pf1-x434.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:299703 Archived-At: > On Nov 12, 2022, at 7:50 PM, Stefan Kangas = wrote: >=20 > Randy Taylor writes: >=20 >>> Instead of a flat list, now categorize imenu entries into categories >>> like "Function", "Variable", "Class", etc. >>=20 >> Can this be made an option? I prefer a flat list. >>=20 >> I don't know how it looked before, but something like: >> Struct structName >> Field/structName fieldA >> Field/structName fieldB >> Function func1 >> Function func2 >>=20 >> would be even better (that's what eglot shows on a golang buffer). >=20 > Me too. Completing over a flat list tends to work much better with = the > completion framework I use (ivy). I suspect you two are already using a categorized imenu list. The = =E2=80=9CStruct=E2=80=9D, =E2=80=9CFunction=E2=80=9D are actually = category labels. I think nowadays every completion framework (ivy, = consult) flattens the imenu list.=20 Yuan=