From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Standardizing tree-sitter fontification features Date: Mon, 05 Dec 2022 09:58:03 +0100 Message-ID: <87sfhuxm5g.fsf@thornhill.no> References: <2AEA8AB6-593E-4D89-AB05-0C8EB2BCE327@gmail.com> <5B7EE037-C85A-411C-B42B-1E234EE66DFA@gmail.com> <64C676F2-C4A0-4D28-8FE7-5FB250BF1B9B@gmail.com> 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="16980"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 05 09:59:11 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 1p27Jf-00048Y-0d for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Dec 2022 09:59:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p27Il-000297-DK; Mon, 05 Dec 2022 03:58:18 -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 1p27If-00027l-SI for emacs-devel@gnu.org; Mon, 05 Dec 2022 03:58:10 -0500 Original-Received: from out-126.mta0.migadu.com ([2001:41d0:1004:224b::7e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p27Ie-0001zG-24 for emacs-devel@gnu.org; Mon, 05 Dec 2022 03:58:09 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670230685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CiMgV0qRlgJz/8xem+7rd4/w7GbElIcBH3s5HrNtgro=; b=NewzMGWok2Yw31jqf2iiIhKrOGIMK5nIOaxj1NlxQZ53+RUw0NcX647e6mjEs6/QkmAxDR f8RqmEptQLip83p0oRtlRSHDHcZfMIvCCc/g3jjYB6kPbUMbqhmW6ZyzVdj8rvehEDxkEL NG2KOuCWBcY66rsmYgGJSu5b+VzWSbivrAScBYHUpPPs5oeWnELHyamz/fwHhsfMNQvwy4 /vQSDWFU2HmsRcBDlsEtAc0HqRfuzLF8V54nlNbSyzIirZ7o3dhsO/QMVYN0p2jzwo8Tbu sdStWP5OdsrYaFnX7Gdh7Z/E02JxyuljMOB8x0lcj2/DUt93d2S4A3XlphB58A== In-Reply-To: <64C676F2-C4A0-4D28-8FE7-5FB250BF1B9B@gmail.com> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::7e; envelope-from=theo@thornhill.no; helo=out-126.mta0.migadu.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, 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:300923 Archived-At: Mattias Engdeg=C3=A5rd writes: > 3 dec. 2022 kl. 02.12 skrev Yuan Fu : > >> - doc-comment seems rather non-standards, and could even be different >> from project to project. > > They actually tend to be quite well standardised for most > languages. Main exceptions are C and C++, but even there Doxygen seems > to dominate. > >> So I tend to think it should be turned on/off by a major mode >> variable in major modes that support this feature. And user can >> enable/disable it with dir-local or file-local variables. > > I definitely think doc comments should be painted differently from > other comments by default, at least for languages where there is a > clear standard. I agree - but in most tree-sitter languages it seems like there usually is no distinction between them. We need to implement some heuristics to locate a comment above method etc, if I'm not mistaken. Theo