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.bugs Subject: bug#58844: 29.0.50; Font lock features for js/ts-mode Date: Fri, 28 Oct 2022 13:25:53 -0700 Message-ID: References: <87ilk3rbp5.fsf@thornhill.no> <9D349316-6AA2-4A5C-8010-110100F3EDB5@gmail.com> <87r0yrd8ic.fsf@thornhill.no> 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="14791"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58844@debbugs.gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 28 22:27:27 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ooVwr-0003er-Bh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Oct 2022 22:27:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooVwW-0001Qs-JC; Fri, 28 Oct 2022 16:27:05 -0400 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 1ooVwU-0001Ml-Vg for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 16:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooVwU-0005oE-DB for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 16:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ooVwT-00082u-Q1 for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 16:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Oct 2022 20:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58844 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: Bug Report Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.166698877930878 (code B ref -1); Fri, 28 Oct 2022 20:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Oct 2022 20:26:19 +0000 Original-Received: from localhost ([127.0.0.1]:34395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooVvm-00081v-1q for submit@debbugs.gnu.org; Fri, 28 Oct 2022 16:26:19 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:44934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooVvg-00081k-Aq for submit@debbugs.gnu.org; Fri, 28 Oct 2022 16:26:16 -0400 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 1ooVvV-0000qf-Oy for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 16:26:08 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooVvQ-0005d7-JB for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 16:26:01 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id y13so5702029pfp.7 for ; Fri, 28 Oct 2022 13:25:56 -0700 (PDT) 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=3pbkhsMSo/gyZkhRcTJn9KfSv8jKmcBjQpbF2FhchSE=; b=OlRBxuek9mTq1TSDV2Jt0TvMrZLiDeUoTOHrbItMPF75Jc36e1TiOOnLHHv+SVZTv7 FndCfzvHUFQZZcbGnEi+pvvF6DgDYfQSwZEMuUy1WijFdEUBh92JbbWTrQE6Fj3t+jHq ORSsI3H7Iza1X0pXdsNfjtnfOpft6G7qj7Fe4EKHK8VSW3KOqBU8afwLwCOd28VA5WuS utFXCJEXDjXhhTKzn08NJolbjwdJh4vOnxRaQBkxHJafoM9AuoBL+wFqgKW94LnwXaHd +n1fWW80rdSJ9Gdy1YpEQ/KWCAa9nOAGRUviErnFzTP5KUyE34hJThW1z3kmmsQzo/QQ t3yg== 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=3pbkhsMSo/gyZkhRcTJn9KfSv8jKmcBjQpbF2FhchSE=; b=rkr24IxfpwRfP2fc8gL/xx3ubgv7jXN+ZKpJZWZZX6wAbGMGxJR6trnU7tR+nljao7 1vJMat28xehBRQvYIf1sQRGESv+S2S59qsrhCyZ2Xlsm0eHfcnsLM60USeBJFVXEAff9 C4DewOgQRH728INrt9TdusS273xRBro4qJmgtYOdz9j+avA/m0nWdbsmE1zIZv+nsMGG UwN7x2c3zl5rIeYJSnLOkuzQP0eXbLK9FMg/yzqYUqJNE7WObBQzTtS0m5hqD2c3Ax6A jSk+D7XP1++tiU6Xw3T2KNLfIncdRtaIdK35q0y+kM4RK1DrKMgpxCaK8kUFOD5fqk1v FBOg== X-Gm-Message-State: ACrzQf0w8pMSPuHgZcE5ci77dP9k+2B4USWRcKPN/CYI+e7Out2fZw6m MbzcuRa88eeFAyLJoK2dVC0= X-Google-Smtp-Source: AMsMyM7m/Af+eBxB3nNt5FrsWcfViixeVsPJcBxqAZIp0NNCXCgs1ux06htAIwMUfpEHUD6jJQbBqw== X-Received: by 2002:a05:6a02:190:b0:43c:7997:4d69 with SMTP id bj16-20020a056a02019000b0043c79974d69mr1106180pgb.15.1666988754990; Fri, 28 Oct 2022 13:25:54 -0700 (PDT) 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 a7-20020a170902710700b00179f370dbe7sm3407624pll.287.2022.10.28.13.25.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2022 13:25:54 -0700 (PDT) In-Reply-To: <87r0yrd8ic.fsf@thornhill.no> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=casouri@gmail.com; helo=mail-pf1-x42d.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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246461 Archived-At: > On Oct 28, 2022, at 12:59 PM, Theodor Thornhill = wrote: >=20 > Yuan Fu writes: >=20 >>> On Oct 28, 2022, at 12:27 PM, Theodor Thornhill = wrote: >>>=20 >>> Hi Yuan! >>>=20 >>> I've added more font lock features to the js and ts modes. I think = they >>> can serve as a suitable starting point for the features, and serve = as >>> inspiration to other modes, until we settle on a standard here. >>>=20 >>> Thanks, >>>=20 >>> Theo >>>=20 >>> <0001-Add-in-new-font-lock-features-in-js-ts-mode.patch> >>=20 >> Thanks! Minor bikeshed: I think singular is slightly better. Ie, >> comment instead of comments. No need to modify your patch, if you >> agree I can change them myself. Also treesit-font-lock-feature-list >> should contain three sublist, each representing a decoration level, >> that=E2=80=99s how we get two types of customization in the same = time. I can >> fix that too. >>=20 >=20 > Sure, just go ahead! >=20 >> While we=E2=80=99re at it, are there specific reasons why you write = many indent rules in two lines, like this: >>=20 >> ((parent-is "ternary_expression") >> parent-bol ,ts-mode-indent-offset) >>=20 >> ? >>=20 >> I think they should be in one line for clarity and space efficiency. >=20 > Sure! The only reason was that you asked me to cram it into short = lines, > hehe ;-) Do you want another patch for that? My bad, anywhere between 70 to 80 columns is good. I can change them = myself. Thanks! Yuan