From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: [SPAM UNSURE] Average-user-facing interface for tree-sitter Date: Wed, 12 Oct 2022 23:32:25 -0700 Message-ID: <8635bsfd3a.fsf@stephe-leake.org> References: <3A7E7CD1-74A7-4352-9DFE-FC982EAA398E@gmail.com> <86czawfsq6.fsf@stephe-leake.org> Mime-Version: 1.0 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="21504"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) Cc: emacs-devel To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 13 08:47:05 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 1oirzk-0005Ky-Hg for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Oct 2022 08:47:05 +0200 Original-Received: from localhost ([::1]:40866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oirzj-0001Xj-Fg for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Oct 2022 02:47:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oirnT-0001o4-MF for emacs-devel@gnu.org; Thu, 13 Oct 2022 02:34:31 -0400 Original-Received: from qproxy3-pub.mail.unifiedlayer.com ([67.222.38.20]:58033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oirnP-0003ps-FE for emacs-devel@gnu.org; Thu, 13 Oct 2022 02:34:22 -0400 Original-Received: from outbound-ss-761.bluehost.com (outbound-ss-761.bluehost.com [74.220.211.250]) by qproxy3.mail.unifiedlayer.com (Postfix) with ESMTP id B2A69802C3C6 for ; Thu, 13 Oct 2022 06:34:02 +0000 (UTC) Original-Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id 52274100401CF for ; Thu, 13 Oct 2022 06:32:30 +0000 (UTC) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id irleoC4Xsj36OirleosaMe; Thu, 13 Oct 2022 06:32:30 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=T89J89GQ c=1 sm=1 tr=0 ts=6347b0fe a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=Qawa6l4ZSaYA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=9i_RQKNPAAAA:8 a=pGLkceISAAAA:8 a=ZnfV_pyyHj87bPzf5EsA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=YmVLrQmyUoEA:10:uccc_2email_address a=_efulHcpp3sA:10:hookup_email_user_1 a=xIHpHBSqFYYjWdlKNEB-:22 a=Ev4oQ7kfJBNsvnoXShoW:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=p0EbVQbwo9TKicuYCKIWGwgyh/JxLTjJPHL4pg6XDDw=; b=inDV7j5nX8L8p8vKccQjHiiYLr u7SJYUf7jtc0HPXiBYrgfjTitxuBL6u4A9gWU0UAX24MRdgZIv5ALlkOH3xcQ8FuwCDP1HNHGOc9t uuS5i2/sQuD1x2YawkU1TSXwIOi7F8r6FcUJd72CcAZQsIqbq9P1rMCsAMcfStafb+1lVtJHMaY+Y zq8fY5xa5McZq7Garoh5tcca80/MF8tHePBVe2cmtbe10bICqE5d6AtpAWsEu9K4qRFvWt6JSO/sK PCj8L+DzfAlv4LE8BjJlLN3QyRxCXSOXSlBcdKOO3RQtGCXyvosHKoyGkNdJK+m7V7BT9hyj0r9B3 DyEcvavQ==; Original-Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:62559 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oirld-001yjv-Pu; Thu, 13 Oct 2022 00:32:29 -0600 In-Reply-To: <86czawfsq6.fsf@stephe-leake.org> (Stephen Leake's message of "Wed, 12 Oct 2022 17:54:41 -0700") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1oirld-001yjv-Pu X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:62559 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 6 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=67.222.38.20; envelope-from=stephen_leake@stephe-leake.org; helo=qproxy3-pub.mail.unifiedlayer.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:297658 Archived-At: Stephen Leake writes: > Yuan Fu writes: > >> From the suggestions I collected from the old thread, here is my proposa= l: >> >> We define a custom option treesit-settings (we can discuss the name >> later), which controls whether to enable/disable tree-sitter for each >> major mode, and the default preference, like this: >> >> (defcustom treesit-settings '((t nil nil)) >> "Tree-sitter toggles for major modes. >> >> A list of (MODE ENABLE INHERIT). MODE is a major mode, ENABLE >> can be one of the following: >> >> demand =3D> Demand the use of tree-sitter, warn if can't enable. >> t =3D> Enable if available >> nil =3D> Don't enable >> >> If INHERIT is nil, the setting does't apply to derived modes of >> MODE, if t, the setting does apply. >> >> If MODE is t, the settings applies to all the modes which don't >> have any setting. INHERIT doesn't matter for this special >> default setting." >> :type =E2=80=A6) > > This is reasonable, but I think we will need finer control. LSP has > dozens of features that can be individually supported or not by a given > server. I don't think Emacs needs to go that far (although eglot does > support that). I think separate control for face, indent, xref, and > maybe imenu would be reasonable. > > In the above, perhaps ENABLE could be a symbol if it controls all > features for a mode, or a plist to specify features separately: > > (mode (:face ENABLE :indent ENABLE ...) INHERIT). > > I'm not sure if INHERIT needs to be similarly split. As I mentioned in my other email, also signature-help, completion, diagnostics. --=20 -- Stephe