From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Standardizing tree-sitter fontification features Date: Mon, 5 Dec 2022 11:26:21 +0100 Message-ID: <4FC19A2A-E4B3-4BB4-B718-8BB0BE70B04B@gmail.com> References: <2AEA8AB6-593E-4D89-AB05-0C8EB2BCE327@gmail.com> <5B7EE037-C85A-411C-B42B-1E234EE66DFA@gmail.com> <64C676F2-C4A0-4D28-8FE7-5FB250BF1B9B@gmail.com> <87sfhuxm5g.fsf@thornhill.no> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33807"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , emacs-devel To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 05 13:18:22 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 1p2AQP-0008bA-N4 for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Dec 2022 13:18:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2APn-0003rX-9l; Mon, 05 Dec 2022 07:17:43 -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 1p28g7-00028D-N2 for emacs-devel@gnu.org; Mon, 05 Dec 2022 05:26:27 -0500 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p28g6-0006jG-3Z for emacs-devel@gnu.org; Mon, 05 Dec 2022 05:26:27 -0500 Original-Received: by mail-lf1-x131.google.com with SMTP id b13so6867801lfo.3 for ; Mon, 05 Dec 2022 02:26:25 -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:sender:from:to:cc:subject :date:message-id:reply-to; bh=lqf8RzT33EZd+HDudBzB0q5mV5eYGfgqvy87kfRMbOc=; b=E5mhh61I3wdaRILEsEx8G2vjzI/FqnMo9a2sFtfPai0oM5vFOHaLWTfkJmIANuztg0 HDDLKBBgP5H0meuZGseSyfB+0sXA4OtWO+oeGwloWnGo/S8FaYhjh9z/6uFTM60i821x J2pwCztW4FqMnIGkBfu/dZ0ZbfKcOOP4br7vrnpnmCbxX/f6YJ9aigwb4wKAqbTDCstF UFw4FDCRruX/w9kt8ughvSXGosxwqUgJD/5Oq/M8BRVqcstaoJj3ZwBauQQVMDZru4ZP +cwAvLLgolspp1SpkU8AM7qFFaAnHgSd3XSF8UGtkUOCW+Wz9MyQpTpu+E8cRg9p3bSe Gr6Q== 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:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lqf8RzT33EZd+HDudBzB0q5mV5eYGfgqvy87kfRMbOc=; b=JK1WNy6thUxAK2oVLRu93FnVicAB/vWXxXaaIyR6buiZ8Lq5vZYq9x+YpKtFrYOMJn 21B1D5WnaqMmA2XxwzYm5iJYwmS6S/Jly6vO19zJPl89B+W2uve7lmSCrCKRYe2ZlppH o4zQWDWAEL6CUnuRm235Ibr4xRd2vMm+u+EJupQFhdUp3W7li7VvJuH3Io+fr3hz1+f6 WgOjIybvhkoAoyKoQVA5BeCkWAR3tSQb/L5AgPnrUbhwAsHDnNsEpxKf/znpDPE0zt9P FGWoHD8YwUxBgkKvD/fOn7BT1+jTadVUj4aru0oLPLZ8xBS+Ksmb7OFBWETnIte09Z9J bU8g== X-Gm-Message-State: ANoB5pnGaEG7IgRwHOw1lQTmvsMjF0JZaeSdO7AksYoleNaQfntclXYI BWqx9otOzsN7kN4EKUWZvuU= X-Google-Smtp-Source: AA0mqf7peSzCGF39AfOTyJQmbMJAevHOwz5Qj2q0wcZ3vre8pY39b+pSknSXkB4OsemKgJlfr2JdcQ== X-Received: by 2002:a05:6512:33c5:b0:4b5:237a:fb0d with SMTP id d5-20020a05651233c500b004b5237afb0dmr8971078lfg.658.1670235983605; Mon, 05 Dec 2022 02:26:23 -0800 (PST) Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id s3-20020a056512214300b004b0b2212315sm2079772lfr.121.2022.12.05.02.26.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2022 02:26:22 -0800 (PST) In-Reply-To: <87sfhuxm5g.fsf@thornhill.no> X-Mailer: Apple Mail (2.3654.120.0.1.13) Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x131.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-Mailman-Approved-At: Mon, 05 Dec 2022 07:17:41 -0500 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:300926 Archived-At: 5 dec. 2022 kl. 09.58 skrev Theodor Thornhill : > 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. At least distinguish doc comments by their special syntax, such as `-- = !` or `/**`; it's better than nothing and only requires local analysis. = A grammar tie-in to make sure they aren't misplaced is obviously better = (and valuable) but it can be a later improvement.