GNU logs - #68054, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Noah Peart <noah.v.peart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 27 Dec 2023 06:22:01 +0000
Resent-Message-ID: <handler.68054.B.170365808719629 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 68054 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.170365808719629
          (code B ref -1); Wed, 27 Dec 2023 06:22:01 +0000
Received: (at submit) by debbugs.gnu.org; 27 Dec 2023 06:21:27 +0000
Received: from localhost ([127.0.0.1]:35241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rINIE-00056W-Kd
	for submit <at> debbugs.gnu.org; Wed, 27 Dec 2023 01:21:27 -0500
Received: from lists.gnu.org ([2001:470:142::17]:34100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noah.v.peart@HIDDEN>) id 1rINIB-00056J-MK
 for submit <at> debbugs.gnu.org; Wed, 27 Dec 2023 01:21:24 -0500
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 <noah.v.peart@HIDDEN>)
 id 1rINI7-0001zu-KF
 for bug-gnu-emacs@HIDDEN; Wed, 27 Dec 2023 01:21:19 -0500
Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <noah.v.peart@HIDDEN>)
 id 1rINI5-0004Dv-Py
 for bug-gnu-emacs@HIDDEN; Wed, 27 Dec 2023 01:21:19 -0500
Received: by mail-ot1-x333.google.com with SMTP id
 46e09a7af769-6dc076e9e59so23325a34.2
 for <bug-gnu-emacs@HIDDEN>; Tue, 26 Dec 2023 22:21:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1703658076; x=1704262876; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=sRQH7sWBz8h9Q04GA8N+t3NrMfPcYvRSehORSuwRlZQ=;
 b=eutM4p63uMooQp02GF56O6XdvqbT3wyyF9Fj3vaeDl7nr+Uum0Jx1/oxQdYexyjy2o
 XZB3kOc4i6UtvvGTEk7VnhN5g+yqwMNMIKGPYpjL0oqEi2QJNn2Rqq04fd/cZJp0/HdE
 8ZSkHCvV6POKEBK29/DiFt2fGyu4GkG42lpmjUdObcN4rLjAtB1ikxiIf9OMWPzHBYc6
 1R99CrJnb4RfikU0yll+kZQ38HFoFvobj2h5dab2yGW9TISrSnaqUL7jkp1B+gCA3UN1
 AkI97TAo2YUjgskiLuFjFwg7Xo3MIiXH4d/SXEULdcezfkNR1vKwtrphOCIe9K3JZouF
 zMGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1703658076; x=1704262876;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=sRQH7sWBz8h9Q04GA8N+t3NrMfPcYvRSehORSuwRlZQ=;
 b=SoCJgW3FYX4UUDZzFje7UdzbXZSrivbssqsJBFNnsINhSGJBa+uMfQdP5YYniwD3sL
 ruMWG16arU4wSQ9FJMnHUqg/yTQw10sTway/WLDZJl+gnh6SLuM9vre8yBnuSWPHdnLc
 Tm/JcBfQmpSVXiv2OOBB3HBxcldTN+XioyENR5/KM21SNYq+k+GEdo0d+bWJxLePde7L
 5xXjWnWDloSpH/Akq2RSxZfiqgYk0aZGhEZnDz5b0nTbUVbvudlejX5ng8m9EE0mHM6S
 oapdgCGaqh5/kV7LgUi0LHP4cueOGOlzZa5WxMHvARBzzfG7zMWDLL3yc3Las7yUe5I9
 OtKw==
X-Gm-Message-State: AOJu0YwIFK33wSQ10yU/D89f/znKFnd/CmIPbxR3/jC6YqhHSHyvSlYS
 /NtwGko8lhR35UW8kvalYeBrqOAmcxXmmblQ+t/GetsO+FrCeTNe
X-Google-Smtp-Source: AGHT+IEozu9CYXucLu+tzRf6aHj0N9oH++5eM5h+VT8lTjUYSkk/KOtFiRuo4ugtlsjyqQzOZ+jsnPhtnnIeImYIm5o=
X-Received: by 2002:a05:6870:9720:b0:1fa:fd62:18f5 with SMTP id
 n32-20020a056870972000b001fafd6218f5mr10420660oaq.22.1703658075832; Tue, 26
 Dec 2023 22:21:15 -0800 (PST)
MIME-Version: 1.0
From: Noah Peart <noah.v.peart@HIDDEN>
Date: Wed, 27 Dec 2023 01:21:05 -0500
Message-ID: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
Content-Type: multipart/mixed; boundary="0000000000006e83f3060d77ceae"
Received-SPF: pass client-ip=2607:f8b0:4864:20::333;
 envelope-from=noah.v.peart@HIDDEN; helo=mail-ot1-x333.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,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--0000000000006e83f3060d77ceae
Content-Type: multipart/alternative; boundary="0000000000006e83f1060d77ceac"

--0000000000006e83f1060d77ceac
Content-Type: text/plain; charset="UTF-8"

Tags: patch

* Bug: `js-ts-mode` and `typescript-ts-mode` are missing indentation
rules for lexical declarations that span multiple lines.

Recipe to reproduce:

Using the following function to configure js-ts-mode and indent the
buffer:

    (defun try-indent ()
      (interactive)
      (js-ts-mode)
      (setq-local indent-tabs-mode nil)
      (setq-local js-indent-level 4)
      (indent-region (point-min) (point-max)))

Add the following example to a buffer and call `try-indent`.

    let foo = 1,
    bar = 2; // no indent rule matches this line

No indentation is applied to the second line.

This patch adds a simple indentation rules for `js-ts-mode` and
`typescript-ts-mode` to handle the multi-line lexical declarations.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.16.0) of 2023-12-26 built on nverno-XPS-8940
Repository revision: d376462c7183752bf44b9bd20bf5020fe7eaf75a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.3 LTS

Configured using:
 'configure --prefix=/usr/local --with-modules --with-tree-sitter
--with-threads --with-x-toolkit=gtk3 --with-xwidgets --with-gnutls
--with-json --with-mailutils --with-jpeg --with-png --with-rsvg
--with-tiff --with-xml2 --with-xpm --with-imagemagick CC=gcc-12
CXX=gcc-12'

--0000000000006e83f1060d77ceac
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Tags: patch<br><br>* Bug: `js-ts-mode` and `typescript-ts-=
mode` are missing indentation<br>rules for lexical declarations that span m=
ultiple lines.<br><br>Recipe to reproduce:<br><br>Using the following funct=
ion to configure js-ts-mode and indent the<br>buffer:<br><br>=C2=A0 =C2=A0 =
(defun try-indent ()<br>=C2=A0 =C2=A0 =C2=A0 (interactive)<br>=C2=A0 =C2=A0=
 =C2=A0 (js-ts-mode)<br>=C2=A0 =C2=A0 =C2=A0 (setq-local indent-tabs-mode n=
il)<br>=C2=A0 =C2=A0 =C2=A0 (setq-local js-indent-level 4)<br>=C2=A0 =C2=A0=
 =C2=A0 (indent-region (point-min) (point-max)))<br><br>Add the following e=
xample to a buffer and call `try-indent`.<br><br>=C2=A0 =C2=A0 let foo =3D =
1,<br>=C2=A0 =C2=A0 bar =3D 2; // no indent rule matches this line<br><br>N=
o indentation is applied to the second line.<br><br>This patch adds a simpl=
e indentation rules for `js-ts-mode` and<br>`typescript-ts-mode` to handle =
the multi-line lexical declarations.<br><br><br>In GNU Emacs 30.0.50 (build=
 1, x86_64-pc-linux-gnu, GTK+ Version<br>3.24.33, cairo version 1.16.0) of =
2023-12-26 built on nverno-XPS-8940<br>Repository revision: d376462c7183752=
bf44b9bd20bf5020fe7eaf75a<br>Repository branch: master<br>Windowing system =
distributor &#39;The X.Org Foundation&#39;, version 11.0.12101004<br>System=
 Description: Ubuntu 22.04.3 LTS<br><br>Configured using:<br>=C2=A0&#39;con=
figure --prefix=3D/usr/local --with-modules --with-tree-sitter<br>--with-th=
reads --with-x-toolkit=3Dgtk3 --with-xwidgets --with-gnutls<br>--with-json =
--with-mailutils --with-jpeg --with-png --with-rsvg<br>--with-tiff --with-x=
ml2 --with-xpm --with-imagemagick CC=3Dgcc-12<br>CXX=3Dgcc-12&#39;<br></div=
>

--0000000000006e83f1060d77ceac--

--0000000000006e83f3060d77ceae
Content-Type: text/x-patch; charset="US-ASCII"; name="js-ts-indent-decls.patch"
Content-Disposition: attachment; filename="js-ts-indent-decls.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_lqndzgao0>
X-Attachment-Id: f_lqndzgao0

RnJvbSA0YzI3OTNmY2RiMTE5OTI1MzM5NjUxMWExM2MxMzUxOWM3NmJiODE3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBOb2FoIFBlYXJ0IDxub2FoLnYucGVhcnRAZ21haWwuY29tPgpE
YXRlOiBXZWQsIDI3IERlYyAyMDIzIDAwOjUwOjQ2IC0wNTAwClN1YmplY3Q6IFtQQVRDSF0gQWRk
IHRyZWUtc2l0dGVyIGluZGVudCBydWxlIGZvciBsZXhpY2FsIGRlY2xzIGluCiBqcy90eXBlc2Ny
aXB0CgoqIGxpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbAoodHlwZXNjcmlwdC10
cy1tb2RlLS1pbmRlbnQtcnVsZXMpOiBBZGQgaW5kZW50IHJ1bGUgZm9yCmxleGljYWxfZGVjbGFy
YXRpb25zLgoKKiBsaXNwL3Byb2dtb2Rlcy9qcy5lbCAoanMtLXRyZWVzaXQtaW5kZW50LXJ1bGVz
KTogQWRkIGluZGVudCBydWxlCmZvciBsZXhpY2FsX2RlY2xhcmF0aW9ucy4KLS0tCiBsaXNwL3By
b2dtb2Rlcy9qcy5lbCAgICAgICAgICAgICAgICAgfCAxICsKIGxpc3AvcHJvZ21vZGVzL3R5cGVz
Y3JpcHQtdHMtbW9kZS5lbCB8IDEgKwogMiBmaWxlcyBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKykK
CmRpZmYgLS1naXQgYS9saXNwL3Byb2dtb2Rlcy9qcy5lbCBiL2xpc3AvcHJvZ21vZGVzL2pzLmVs
CmluZGV4IDYxYmQ5NDIyMmFjLi45MzU2NTVmNzc5ZiAxMDA2NDQKLS0tIGEvbGlzcC9wcm9nbW9k
ZXMvanMuZWwKKysrIGIvbGlzcC9wcm9nbW9kZXMvanMuZWwKQEAgLTM0NDksNiArMzQ0OSw3IEBA
IGpzLS10cmVlc2l0LWluZGVudC1ydWxlcwogICAgICAgICgocGFyZW50LWlzICJuYW1lZF9pbXBv
cnRzIikgcGFyZW50LWJvbCBqcy1pbmRlbnQtbGV2ZWwpCiAgICAgICAgKChwYXJlbnQtaXMgInN0
YXRlbWVudF9ibG9jayIpIHBhcmVudC1ib2wganMtaW5kZW50LWxldmVsKQogICAgICAgICgocGFy
ZW50LWlzICJ2YXJpYWJsZV9kZWNsYXJhdG9yIikgcGFyZW50LWJvbCBqcy1pbmRlbnQtbGV2ZWwp
CisgICAgICAgKChwYXJlbnQtaXMgImxleGljYWxfZGVjbGFyYXRpb24iKSBwYXJlbnQtYm9sIGpz
LWluZGVudC1sZXZlbCkKICAgICAgICAoKHBhcmVudC1pcyAiYXJndW1lbnRzIikgcGFyZW50LWJv
bCBqcy1pbmRlbnQtbGV2ZWwpCiAgICAgICAgKChwYXJlbnQtaXMgImFycmF5IikgcGFyZW50LWJv
bCBqcy1pbmRlbnQtbGV2ZWwpCiAgICAgICAgKChwYXJlbnQtaXMgImZvcm1hbF9wYXJhbWV0ZXJz
IikgcGFyZW50LWJvbCBqcy1pbmRlbnQtbGV2ZWwpCmRpZmYgLS1naXQgYS9saXNwL3Byb2dtb2Rl
cy90eXBlc2NyaXB0LXRzLW1vZGUuZWwgYi9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1v
ZGUuZWwKaW5kZXggN2YwYjcyMzYzMDEuLmEwZjZlN2M5NTAxIDEwMDY0NAotLS0gYS9saXNwL3By
b2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUuZWwKKysrIGIvbGlzcC9wcm9nbW9kZXMvdHlwZXNj
cmlwdC10cy1tb2RlLmVsCkBAIC0xMTQsNiArMTE0LDcgQEAgdHlwZXNjcmlwdC10cy1tb2RlLS1p
bmRlbnQtcnVsZXMKICAgICAgKChwYXJlbnQtaXMgInN3aXRjaF9kZWZhdWx0IikgcGFyZW50LWJv
bCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkKICAgICAgKChwYXJlbnQtaXMgInR5
cGVfYXJndW1lbnRzIikgcGFyZW50LWJvbCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNl
dCkKICAgICAgKChwYXJlbnQtaXMgInZhcmlhYmxlX2RlY2xhcmF0b3IiKSBwYXJlbnQtYm9sIHR5
cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQorICAgICAoKHBhcmVudC1pcyAibGV4aWNh
bF9kZWNsYXJhdGlvbiIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZz
ZXQpCiAgICAgICgocGFyZW50LWlzICJhcmd1bWVudHMiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQt
dHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAiYXJyYXkiKSBwYXJlbnQt
Ym9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAi
Zm9ybWFsX3BhcmFtZXRlcnMiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQt
b2Zmc2V0KQotLSAKMi4zNC4xCgo=
--0000000000006e83f3060d77ceae--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Noah Peart <noah.v.peart@HIDDEN>
Subject: bug#68054: Acknowledgement ([PATCH] Add tree-sitter indent rule
 for lexical decls in js/typescript)
Message-ID: <handler.68054.B.170365808719629.ack <at> debbugs.gnu.org>
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
X-Gnu-PR-Message: ack 68054
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Reply-To: 68054 <at> debbugs.gnu.org
Date: Wed, 27 Dec 2023 06:22:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 68054 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
68054: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68054
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 27 Dec 2023 21:38:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 27 16:38:54 2023
Received: from localhost ([127.0.0.1]:37956 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rIbc5-0004VC-PZ
	for submit <at> debbugs.gnu.org; Wed, 27 Dec 2023 16:38:53 -0500
Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:42018)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1rIbc4-0004Uz-Dd
 for control <at> debbugs.gnu.org; Wed, 27 Dec 2023 16:38:52 -0500
Received: by mail-ed1-x532.google.com with SMTP id
 4fb4d7f45d1cf-5534dcfdd61so9548806a12.0
 for <control <at> debbugs.gnu.org>; Wed, 27 Dec 2023 13:38:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1703713128; x=1704317928; darn=debbugs.gnu.org;
 h=to:subject:message-id:date:mime-version:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=u4YdAxL0hOBAY8f2oI3Wc90IbjMJfewFxUxKYofCfcA=;
 b=C5Np3LWHi6ufxLTqUKZckxiypsB7uKAIEe4lhXE8L2KEE575wHWLpmF8oqKUYXepmW
 0cg3IJ/kr75/AuszyXwdD3s11a+bN1QC6E2iExXbRV4ytLAPGi4/d1joKOYfu3z6CJdO
 Eze691HIQf5kuZaUtwT9VuuFGaMoSbUcQN/oISec3SKZ0dyBBNu9h0PO+IjCqsrHpBHY
 BEmZSkARy8ETfR6s0kXtcCYVVKm5lNJONimacChZW5pUGllVQqRujbXm97Y0IecQCB1R
 viVdUAACu4FoMpuPlSHvV4KqERHiWPwzr7paaT0dqsnAgNukRyDn6KsBwjZ087Fv0J8r
 WdoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1703713128; x=1704317928;
 h=to:subject:message-id:date:mime-version:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=u4YdAxL0hOBAY8f2oI3Wc90IbjMJfewFxUxKYofCfcA=;
 b=m8RPBsm0hL5TJ+7x8u7jf47GypP9oUZVXVrwzilRX4LDag+AklXM09mu0Lgjq4/RhE
 aK2/jpJ8znOnQvmc5g+E4xdxV+lkpr3qoW0a8cArfJnUTdHb7DWntYgbNh9gEEfhoyGZ
 pPOLAs8dwgTvwjZvuPsCq8fcIzfj7LNVI0icusKxoytlHIqkZ6Ws1wA01joVgiqqO7w4
 HlAQatfLjA5r1e54Nu9bt9DV4KBqj/L6Vy5EGM0LiChnLOG+Py6/TYC9Uy4LVPPXo3CD
 PLYL20Hvs9IRvAJV5b8ysPKtdzCnjONH9b9d0t2ofATlc7JeZaI39LsB6fNAON0aT1BR
 bvxA==
X-Gm-Message-State: AOJu0YwBFSiWZ1PDZvyRNzW0RQtBlIlYW9pXPijutx8NqvRcL/KyCiax
 ogu6T7L7mZr2OkSTMoNxgUu896JV1olhqZIfSxi9iN9qdKQ=
X-Google-Smtp-Source: AGHT+IHkYdiHhtJEKXnApCPzpZ4h09qaEsZjC5PmN4jIAplYUqHBJrRZaq+CdnF89vDYNkHZarxlHKE3eLXNd30A0gg=
X-Received: by 2002:aa7:c397:0:b0:553:346e:b0d0 with SMTP id
 k23-20020aa7c397000000b00553346eb0d0mr9205702edq.14.1703713127614; Wed, 27
 Dec 2023 13:38:47 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Wed, 27 Dec 2023 13:38:47 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
MIME-Version: 1.0
Date: Wed, 27 Dec 2023 13:38:47 -0800
Message-ID: <CADwFkm=OK5suU7a1pSB00fPJStiEwZExFpw=EGYw2GEfXHWrPw@HIDDEN>
Subject: control message for bug #68054
To: control <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

severity 68054 wishlist
quit




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Yuan Fu <casouri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 30 Dec 2023 04:25:01 +0000
Resent-Message-ID: <handler.68054.B68054.170391027323703 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Noah Peart <noah.v.peart@HIDDEN>
Cc: 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.170391027323703
          (code B ref 68054); Sat, 30 Dec 2023 04:25:01 +0000
Received: (at 68054) by debbugs.gnu.org; 30 Dec 2023 04:24:33 +0000
Received: from localhost ([127.0.0.1]:42793 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rJQtk-0006AF-K4
	for submit <at> debbugs.gnu.org; Fri, 29 Dec 2023 23:24:32 -0500
Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:49429)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1rJQti-0006A2-PB
 for 68054 <at> debbugs.gnu.org; Fri, 29 Dec 2023 23:24:31 -0500
Received: by mail-pl1-x636.google.com with SMTP id
 d9443c01a7336-1d3e8a51e6bso55596155ad.3
 for <68054 <at> debbugs.gnu.org>; Fri, 29 Dec 2023 20:24:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1703910264; x=1704515064; darn=debbugs.gnu.org;
 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=mhMRcyoxUd27Lmm1U+vt4LBEADE4GRanYl3DVbxN2/A=;
 b=NvOzhPk/7NHkpI1zdy7xodWs2g+wHMvVx7HqGxmyZxvlrn+y8UP8kaX0PB7JzCUjbG
 vzBuj7mhd+eT7DJHgnZmj1pJvvU49Fuf0SlnrkAs7El7WTVgl53bjig2q77I3j2FuFMy
 yp0IURUQXkGrL8L1NA1vsf+6sRg8lRsKl3ONU61XNxHBa9H8eMha66ZYp9UQyrQLH0Fx
 /8kTNuAqx+AW0AyLXam/whqga96HU0Q56Sq4bNX1DahyR8UkhuEw/M4jO78q9QSWwc7u
 Lj5Gvrle4i4n7w0kboKoDAjBFpxRqWq/5qQAIgwka6OGe2a35Jf3+gu1eGf62wextDAR
 kYqA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1703910264; x=1704515064;
 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=mhMRcyoxUd27Lmm1U+vt4LBEADE4GRanYl3DVbxN2/A=;
 b=I/0itInL8d7Mm7Q0gxt5d7hjjXmwmmtFVT+HDVxArm7wW/UL80IQxr5muGbp4KpDrM
 nSwOiuhHHzuwuedvFNoSu2GuBZ+Rn/oNYcUVZ3Bla4CD5cbWVkjPOfsdNpEdHLaBYDRr
 9xWEM7hL05H+HDywjd+QEho8CWDhNk3knl2BZOPssEqssmMaLcStwORBh+0J4KS7squj
 X37AU8g+CpO3vvR98rTYJxNEZ//lpFEltVfSLhxnCtT/qoEaRhYVu/beRE2lMoex8A+G
 1YF5/J+oy1a62bNezlOSQwKKL2OhVzAOFbQ0Zo30XbrgjufwjPI2FNqTaAO1mcQ71cIt
 YR4A==
X-Gm-Message-State: AOJu0YznfZ+/AbKjAyh66OqhfNmZy90jyuRoZuEM6aCVfA7rOkgLnUJN
 hCk3sFm8MG/G8YSHBM6c7Uw=
X-Google-Smtp-Source: AGHT+IHk+ONWqe+f//Ob1oPbHm/L3sHnqmDlDHQV343djsZQYFWkTRP7eS/e+MTUc1UrQYzYUrAnKw==
X-Received: by 2002:a17:903:1107:b0:1d4:85a8:3e93 with SMTP id
 n7-20020a170903110700b001d485a83e93mr5304071plh.106.1703910264499; 
 Fri, 29 Dec 2023 20:24:24 -0800 (PST)
Received: from smtpclient.apple (172-117-161-177.res.spectrum.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 jg11-20020a17090326cb00b001d3ef9edfa7sm16495479plb.58.2023.12.29.20.24.23
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 29 Dec 2023 20:24:24 -0800 (PST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
Date: Fri, 29 Dec 2023 20:24:13 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6)
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Dec 26, 2023, at 10:21 PM, Noah Peart <noah.v.peart@HIDDEN> =
wrote:
>=20
> Tags: patch
>=20
> * Bug: `js-ts-mode` and `typescript-ts-mode` are missing indentation
> rules for lexical declarations that span multiple lines.
>=20
> Recipe to reproduce:
>=20
> Using the following function to configure js-ts-mode and indent the
> buffer:
>=20
>     (defun try-indent ()
>       (interactive)
>       (js-ts-mode)
>       (setq-local indent-tabs-mode nil)
>       (setq-local js-indent-level 4)
>       (indent-region (point-min) (point-max)))
>=20
> Add the following example to a buffer and call `try-indent`.
>=20
>     let foo =3D 1,
>     bar =3D 2; // no indent rule matches this line
>=20
> No indentation is applied to the second line.
>=20
> This patch adds a simple indentation rules for `js-ts-mode` and
> `typescript-ts-mode` to handle the multi-line lexical declarations.

Thanks, and sorry for not seeing this. I=E2=80=99ll take a look tonight.

Yuan=




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Yuan Fu <casouri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 30 Dec 2023 20:32:01 +0000
Resent-Message-ID: <handler.68054.B68054.170396830331495 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Noah Peart <noah.v.peart@HIDDEN>
Cc: 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.170396830331495
          (code B ref 68054); Sat, 30 Dec 2023 20:32:01 +0000
Received: (at 68054) by debbugs.gnu.org; 30 Dec 2023 20:31:43 +0000
Received: from localhost ([127.0.0.1]:45122 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rJfzi-0008Bu-Li
	for submit <at> debbugs.gnu.org; Sat, 30 Dec 2023 15:31:42 -0500
Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]:50368)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1rJfze-00088d-Kw
 for 68054 <at> debbugs.gnu.org; Sat, 30 Dec 2023 15:31:41 -0500
Received: by mail-ot1-x32b.google.com with SMTP id
 46e09a7af769-6dbfdb41a63so2892364a34.0
 for <68054 <at> debbugs.gnu.org>; Sat, 30 Dec 2023 12:31:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1703968292; x=1704573092; darn=debbugs.gnu.org;
 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=gcaI/JcYusr/1+gar0A+t/kwDXmZvvyCAsHcf2JQZHA=;
 b=FE6ICX3sws159CGXgwP9joLO4pLb+M5nIfk7K4mtNIzTMESdosiHX9biUcDFf49abg
 q2WOL+F2B4bnEptMGtlzLqUUNNGbM70hmPiLuYSxiTI6t2jv03ULkX6ONbluMxPjmwjR
 tS8h7eeHjN0Kyzn2JeCUPRhfGEMiJi0tb5tlW9czo1nTxeuVYCK4/J2IQMsVxrYgbIGY
 u33BSWgsrLevFTAgoOkII1HfVmY+S8dTHMsyWWjkqmO+S+aRS8LQPzEsH99Ouv9ftEDk
 TqFXU66ZMH9Fjbu9/+DpyuR2/ew15gTuQt391F0J4MKyqcVm79O6p+cEpArPXqoTQiJ5
 SOuw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1703968292; x=1704573092;
 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=gcaI/JcYusr/1+gar0A+t/kwDXmZvvyCAsHcf2JQZHA=;
 b=piTP312Ad26Hpu8N4toGJVroCcdBRSLAJmoh1qHf2CU2cBD63XSDDbfs02uuGO+FIp
 Twn7Tob1YR3G6jATX69q3I4W8Wnhnm98FXDVLM7EfDQkDVti4XR1RVqz1Q744v9LEYEn
 ScWuyP7bbsPJCbuWdDx3ZRPWjpsXRoJTgr9wzUSd5mK8U3aiOnycf/NAlfZd3QlmQpZU
 wGw/LdAtJoPmKpDkmLiAK2oX3gaWLzfPb5lUCmKs5IHizAQYCUwJMAjEhiomCtYcdaBA
 uR7tCd7evEdtFafZ4XvlXakOvkya45HIjMjybVeSn2QVlQI5Z7IHf7fMwZc5yxbUaBlT
 i6Jg==
X-Gm-Message-State: AOJu0Yx+Vl1TVUxmObWZmWffB8Mdioxra8JWMxf3bY6hm5G9EvRx6ZR4
 oRhBB0EuWH+Km0iQK0kuEl4=
X-Google-Smtp-Source: AGHT+IF+8EBrO/Cl+nLoeZq8OySnm+/mNIdJqniKGgLQnSA9JH5fn+EAwQv4kWImmgUEwB+f9g7x8w==
X-Received: by 2002:a05:6870:91d6:b0:203:bf30:bbf3 with SMTP id
 c22-20020a05687091d600b00203bf30bbf3mr17048768oaf.75.1703968291997; 
 Sat, 30 Dec 2023 12:31:31 -0800 (PST)
Received: from smtpclient.apple (172-117-161-177.res.spectrum.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 y42-20020a056a00182a00b006da76842a66sm500445pfa.85.2023.12.30.12.31.31
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 30 Dec 2023 12:31:31 -0800 (PST)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
Date: Sat, 30 Dec 2023 12:31:20 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6)
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Dec 29, 2023, at 8:24 PM, Yuan Fu <casouri@HIDDEN> wrote:
>=20
>=20
>=20
>> On Dec 26, 2023, at 10:21 PM, Noah Peart <noah.v.peart@HIDDEN> =
wrote:
>>=20
>> Tags: patch
>>=20
>> * Bug: `js-ts-mode` and `typescript-ts-mode` are missing indentation
>> rules for lexical declarations that span multiple lines.
>>=20
>> Recipe to reproduce:
>>=20
>> Using the following function to configure js-ts-mode and indent the
>> buffer:
>>=20
>>    (defun try-indent ()
>>      (interactive)
>>      (js-ts-mode)
>>      (setq-local indent-tabs-mode nil)
>>      (setq-local js-indent-level 4)
>>      (indent-region (point-min) (point-max)))
>>=20
>> Add the following example to a buffer and call `try-indent`.
>>=20
>>    let foo =3D 1,
>>    bar =3D 2; // no indent rule matches this line
>>=20
>> No indentation is applied to the second line.
>>=20
>> This patch adds a simple indentation rules for `js-ts-mode` and
>> `typescript-ts-mode` to handle the multi-line lexical declarations.

It seems that js-mode indents bar to align with foo, rather than =
indenting one level. I feel that we should do the same, WDYT?

Yuan=




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 31 Dec 2023 00:32:02 +0000
Resent-Message-ID: <handler.68054.B68054.170398272021184 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Yuan Fu <casouri@HIDDEN>, Noah Peart <noah.v.peart@HIDDEN>
Cc: 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.170398272021184
          (code B ref 68054); Sun, 31 Dec 2023 00:32:02 +0000
Received: (at 68054) by debbugs.gnu.org; 31 Dec 2023 00:32:00 +0000
Received: from localhost ([127.0.0.1]:45330 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rJjkG-0005Va-0S
	for submit <at> debbugs.gnu.org; Sat, 30 Dec 2023 19:32:00 -0500
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:53939)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rJjkC-0005VL-Kl
 for 68054 <at> debbugs.gnu.org; Sat, 30 Dec 2023 19:31:57 -0500
Received: from compute7.internal (compute7.nyi.internal [10.202.2.48])
 by mailout.west.internal (Postfix) with ESMTP id 8B5103200063;
 Sat, 30 Dec 2023 19:31:49 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute7.internal (MEProxy); Sat, 30 Dec 2023 19:31:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1703982709;
 x=1704069109; bh=UZV9Q+4UezXJq37UnojVBKo8Z2Wty56+DPo34hgyN3U=; b=
 eBWKS++4xqzJRS04jxBJs1AB/iuamkGrG9UYyEQMzjyAemIIEmfo/vfgY0pg/15e
 qhGf3WscHkma5H3JqqnIW33IkLcLWhcGm/EL/9kQ4Q9WUeoaj5z49rFt/jNoRdj9
 3yZOhxkUn6E6p3ObTxQ8G/oY6S22+aKYCdJTI3FIfc9N0TzJItRfNrcIAqM8Cjpr
 7xsH7Jyfc32/EMxAiM3EPLHA9OD0u0vMo1w49mYN3ngKEDCbOjY3HAqyVmhZfEkl
 72cLgzlv+O/eyrsyocBL+xBjVMPWDrng0Ltlz3Mt4BzlTIz9uZRj7qXSfCahPLG1
 JSHr/RBVO7h70ZbtwjGemw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1703982709; x=
 1704069109; bh=UZV9Q+4UezXJq37UnojVBKo8Z2Wty56+DPo34hgyN3U=; b=0
 CYv+Y0RnvTZXjyi/B1btzy15itmGDRSFu5n+kOadnWKrYVds1c3k5BrTPPSnsBfI
 l3I3HaSNXOt/NJgNE+nKcQ8D2FmxP5mR7a7X102otem0OqDOP4jpsbExYSjclWvN
 naPpufqGs5TShef8ry1HBsAhiRCH48cCXw4BLvkYANDnDwmQ4lANhAg7/CMxgnS3
 dfi4s/M2v8++QPEk9KSS5d43bXYrL+HAxhsY3e+wZ2uStM/wj+6xWNNJTfOCnfFw
 HXjtZXiM1nFuQ1KyDXv+G7T18/XNbY9u8rYDMafBd0N0h+tG2tG82whMQrBU0qzU
 mNIGLO4D3KJNBbc5QeMpQ==
X-ME-Sender: <xms:dLaQZWCtxmp-ANFb4AFL6KKYIpIuFuE-6I6Ese1WUegDPpeDFKtb4g>
 <xme:dLaQZQgu0lLQOAB-GYwxvG2s9bJxM5w1eNi8L8covE55qmkhfYSPFCL_G6RGJ1uWt
 UvOsDGiEl_C2seRiOE>
X-ME-Received: <xmr:dLaQZZkhmW8w9d8uIp0kf4ZmbP9Wua2wuVWIxASubmXsZmsQ9iEwFpofJ2_-K5vw9OXQaQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdefiedgvdegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:dLaQZUwwUgTRwvy0jUEOBu02ZKqIOn4kw1Xz8ttgsqmFY06jfpJgcg>
 <xmx:dLaQZbSctlgPRWXjzXPYBVps-J0dK1WNmNpardEaMUk1T_TAVePRQg>
 <xmx:dLaQZfYMYeXneS2Go9aLGNm0d3fAf757T1r64aFVtc2f5kcPF4vPBw>
 <xmx:dbaQZSJ56uT6pX4maCJ7xZKIKCzGvxsPnm6JrgBuCG2XZJkJP-F1xA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 30 Dec 2023 19:31:47 -0500 (EST)
Message-ID: <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
Date: Sun, 31 Dec 2023 02:31:46 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 30/12/2023 22:31, Yuan Fu wrote:
> 
>> On Dec 29, 2023, at 8:24 PM, Yuan Fu<casouri@HIDDEN>  wrote:
>>
>>
>>
>>> On Dec 26, 2023, at 10:21 PM, Noah Peart<noah.v.peart@HIDDEN>  wrote:
>>>
>>> Tags: patch
>>>
>>> * Bug: `js-ts-mode` and `typescript-ts-mode` are missing indentation
>>> rules for lexical declarations that span multiple lines.
>>>
>>> Recipe to reproduce:
>>>
>>> Using the following function to configure js-ts-mode and indent the
>>> buffer:
>>>
>>>     (defun try-indent ()
>>>       (interactive)
>>>       (js-ts-mode)
>>>       (setq-local indent-tabs-mode nil)
>>>       (setq-local js-indent-level 4)
>>>       (indent-region (point-min) (point-max)))
>>>
>>> Add the following example to a buffer and call `try-indent`.
>>>
>>>     let foo = 1,
>>>     bar = 2; // no indent rule matches this line
>>>
>>> No indentation is applied to the second line.
>>>
>>> This patch adds a simple indentation rules for `js-ts-mode` and
>>> `typescript-ts-mode` to handle the multi-line lexical declarations.
> It seems that js-mode indents bar to align with foo, rather than indenting one level. I feel that we should do the same, WDYT?

Yes, please. This also makes a difference when the variables are 
declared with 'const' instead of 'let'.

We should also support 'var' declarations: the parent node type to match 
against is "variable_declaration".




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Noah Peart <noah.v.peart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 31 Dec 2023 05:36:01 +0000
Resent-Message-ID: <handler.68054.B68054.170400096025098 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.170400096025098
          (code B ref 68054); Sun, 31 Dec 2023 05:36:01 +0000
Received: (at 68054) by debbugs.gnu.org; 31 Dec 2023 05:36:00 +0000
Received: from localhost ([127.0.0.1]:45484 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rJoUR-0006Wj-IT
	for submit <at> debbugs.gnu.org; Sun, 31 Dec 2023 00:35:59 -0500
Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]:46362)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noah.v.peart@HIDDEN>) id 1rJoUP-0006WT-HE
 for 68054 <at> debbugs.gnu.org; Sun, 31 Dec 2023 00:35:58 -0500
Received: by mail-oa1-x2d.google.com with SMTP id
 586e51a60fabf-2046dee3c14so2767369fac.1
 for <68054 <at> debbugs.gnu.org>; Sat, 30 Dec 2023 21:35:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1704000950; x=1704605750; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=Tb/pqqeHDEqikCsggvSwLgOZAgdYLc8qu8OJT0K6+4k=;
 b=FQ5Sa+JXwJqnPgI2V8Dh0yImG22TNd+i4Bel5JBOb2kUlAyLPj38FD8s8ZAzgdWUtx
 j+BDQoHCiLBBbxUOUxXXvxN9/zY97EnZdyPXCmCY5K5902cQrmgVuWHgNSuwFfyoWinz
 Y92bT+4PSTUGqBqSmJYx2fgf+EIa5XX4DUjYurNKI9JmGgAO9jJbKIL4TPWmkZtp3X/y
 wPVmonZq4SEuws4Ry9ZdmLVG2mtWHBGUJGCeTkFMi5lFnt0mTnR7w9BxhLqsA1qzHOrh
 hUHwyUQDmJ14/LKThbEWqY3CmrFYHonuLk4IYsIUtWJMAygpAO9wt/kqJk606qYBXxGQ
 yTHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1704000950; x=1704605750;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=Tb/pqqeHDEqikCsggvSwLgOZAgdYLc8qu8OJT0K6+4k=;
 b=fDmifxwNRTp3tKebdH+tJp6i7si3P79vRS73pz5nAohhXuatkDjyl5fET5wum4jxTz
 jteDmdUT2tp7UHC4WGNMv/2+c/66ETyoAmTTbAlYX2tNtnEVEoVO/5UG0PN9gj1bZ8R2
 gtlmQ4hEY9wvq0eT9DW7Y3G2OfOOg+FVOgGC1sQijsLlLy5WrXkz5/9ucQGg8dZ24VSS
 S5YVjunK8xWRVdU3/q3PH7QkpudGJ3zClISLAsGy6Rc6/mcoO6kDUaHpnk/9eAv9xzcn
 ZjQYJmW73+mAGwn55UrQlxaVVu2JSL8aJE9dgAdJVzZlwPEGj4zLlF1bYr005ORyu2lG
 kQPA==
X-Gm-Message-State: AOJu0Ywi+aayH0A0iM9J9NgiJom24Rb8fP5DCMvKeYOCt46qmqyDEtU4
 xNl4eaDRh0pCGkSzdoX2ilhRhs9NJ/W+zgQb9ls=
X-Google-Smtp-Source: AGHT+IFvAgPCb8qsHfj+xt/uY6Hk5CGSkFkpqEP8sAQ3qCbuDjWEXZPm3rPujyGYNmWxP4gwJ+VZs+FVdXukG+qn5Mw=
X-Received: by 2002:a05:6808:169e:b0:3bb:d9c9:b927 with SMTP id
 bb30-20020a056808169e00b003bbd9c9b927mr3671559oib.48.1704000950666; Sat, 30
 Dec 2023 21:35:50 -0800 (PST)
MIME-Version: 1.0
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
In-Reply-To: <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
From: Noah Peart <noah.v.peart@HIDDEN>
Date: Sun, 31 Dec 2023 00:35:39 -0500
Message-ID: <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000005c8b22060dc7a3cf"
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000005c8b22060dc7a3cf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Yea, I agree that would be better - would you align on start the variable
names, or '=3D' like
`c-lineup-assignments`?

On Sat, Dec 30, 2023 at 7:31=E2=80=AFPM Dmitry Gutov <dmitry@HIDDEN> wro=
te:

> On 30/12/2023 22:31, Yuan Fu wrote:
> >
> >> On Dec 29, 2023, at 8:24 PM, Yuan Fu<casouri@HIDDEN>  wrote:
> >>
> >>
> >>
> >>> On Dec 26, 2023, at 10:21 PM, Noah Peart<noah.v.peart@HIDDEN>
> wrote:
> >>>
> >>> Tags: patch
> >>>
> >>> * Bug: `js-ts-mode` and `typescript-ts-mode` are missing indentation
> >>> rules for lexical declarations that span multiple lines.
> >>>
> >>> Recipe to reproduce:
> >>>
> >>> Using the following function to configure js-ts-mode and indent the
> >>> buffer:
> >>>
> >>>     (defun try-indent ()
> >>>       (interactive)
> >>>       (js-ts-mode)
> >>>       (setq-local indent-tabs-mode nil)
> >>>       (setq-local js-indent-level 4)
> >>>       (indent-region (point-min) (point-max)))
> >>>
> >>> Add the following example to a buffer and call `try-indent`.
> >>>
> >>>     let foo =3D 1,
> >>>     bar =3D 2; // no indent rule matches this line
> >>>
> >>> No indentation is applied to the second line.
> >>>
> >>> This patch adds a simple indentation rules for `js-ts-mode` and
> >>> `typescript-ts-mode` to handle the multi-line lexical declarations.
> > It seems that js-mode indents bar to align with foo, rather than
> indenting one level. I feel that we should do the same, WDYT?
>
> Yes, please. This also makes a difference when the variables are
> declared with 'const' instead of 'let'.
>
> We should also support 'var' declarations: the parent node type to match
> against is "variable_declaration".
>

--0000000000005c8b22060dc7a3cf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Yea, I agree that would be better - would you align on sta=
rt the variable names, or &#39;=3D&#39; like<div>`c-lineup-assignments`?</d=
iv></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_att=
r">On Sat, Dec 30, 2023 at 7:31=E2=80=AFPM Dmitry Gutov &lt;<a href=3D"mail=
to:dmitry@HIDDEN">dmitry@HIDDEN</a>&gt; wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex">On 30/12/2023 22:31, Yuan Fu wrote:<br=
>
&gt; <br>
&gt;&gt; On Dec 29, 2023, at 8:24 PM, Yuan Fu&lt;<a href=3D"mailto:casouri@=
gmail.com" target=3D"_blank">casouri@HIDDEN</a>&gt;=C2=A0 wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Dec 26, 2023, at 10:21 PM, Noah Peart&lt;<a href=3D"mailto:=
noah.v.peart@HIDDEN" target=3D"_blank">noah.v.peart@HIDDEN</a>&gt;=C2=
=A0 wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Tags: patch<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; * Bug: `js-ts-mode` and `typescript-ts-mode` are missing inden=
tation<br>
&gt;&gt;&gt; rules for lexical declarations that span multiple lines.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Recipe to reproduce:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Using the following function to configure js-ts-mode and inden=
t the<br>
&gt;&gt;&gt; buffer:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0(defun try-indent ()<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0(interactive)<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0(js-ts-mode)<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0(setq-local indent-tabs-mode nil)<br=
>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0(setq-local js-indent-level 4)<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0(indent-region (point-min) (point-ma=
x)))<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Add the following example to a buffer and call `try-indent`.<b=
r>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0let foo =3D 1,<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0bar =3D 2; // no indent rule matches this l=
ine<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; No indentation is applied to the second line.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This patch adds a simple indentation rules for `js-ts-mode` an=
d<br>
&gt;&gt;&gt; `typescript-ts-mode` to handle the multi-line lexical declarat=
ions.<br>
&gt; It seems that js-mode indents bar to align with foo, rather than inden=
ting one level. I feel that we should do the same, WDYT?<br>
<br>
Yes, please. This also makes a difference when the variables are <br>
declared with &#39;const&#39; instead of &#39;let&#39;.<br>
<br>
We should also support &#39;var&#39; declarations: the parent node type to =
match <br>
against is &quot;variable_declaration&quot;.<br>
</blockquote></div>

--0000000000005c8b22060dc7a3cf--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 31 Dec 2023 13:42:02 +0000
Resent-Message-ID: <handler.68054.B68054.170403011312225 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Noah Peart <noah.v.peart@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.170403011312225
          (code B ref 68054); Sun, 31 Dec 2023 13:42:02 +0000
Received: (at 68054) by debbugs.gnu.org; 31 Dec 2023 13:41:53 +0000
Received: from localhost ([127.0.0.1]:45840 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rJw4f-0003B7-GX
	for submit <at> debbugs.gnu.org; Sun, 31 Dec 2023 08:41:53 -0500
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:40833)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rJw4d-0003As-Lk
 for 68054 <at> debbugs.gnu.org; Sun, 31 Dec 2023 08:41:52 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 5ABB65C00B2;
 Sun, 31 Dec 2023 08:41:45 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sun, 31 Dec 2023 08:41:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1704030105;
 x=1704116505; bh=D3H9MHIHQ51v4S1aKXKoa0h/PJnmj5uTY+2oaJOnbYo=; b=
 LW+B9i1+JKTl/pw1VpwgF3w/Ix/gMp0yz37czEdEgBSj9JA2g4ZtRjr06FNvwhvW
 Q9OLjXIny9Dz1j9jUBG2XCw4xfc+A2DyCJ9ZP8knqlIPWuJkLbdbfPmlL2BVMtJg
 Xbiy5CrEhqbnrEHZD4zZ6u1QSZMrtPhaPb3ASboVIOrdf82zn7shmawZZijlTq6X
 QqYQtr4cY9oMyA8EUojV8ijVL94/25whZvo9TIwk4mHxp375JQ5huAxwglZcDwer
 bBAfybBSYndgydE4bsFeCbK/JNhBQPcJT+iwqScbVJnZ6H599olhXl0U2v9PM5B7
 ZqSzPvN5m5wFscA2Za3cLw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704030105; x=
 1704116505; bh=D3H9MHIHQ51v4S1aKXKoa0h/PJnmj5uTY+2oaJOnbYo=; b=j
 +elum7+bTNhw3lbs+tEoJlLfkEUWXuG05VT0ks8JNqjfN7YGAl98dun/ORqnGhTi
 f5DrtTtDGNIEyW627QdFoInaMR6sbiyrIfBugkZzIYqZ94NUx5WHB8kRrAJz0HHR
 +wzwjl23xESLuz4xuTp1kJLn1xUmRvpKzCHb7IdegDQ5bb3Nzvh9pK6lW5U9O4bG
 V6xN3UXHKhKB7hMXTfIB5m6wqn6G7Z9MUua3r9pjYIwTMY7BPGk80h6JWQl2ybFp
 IksBWl1G/yMChKX1ECbqSmtfgP3wzilS+geJH9Mf0LBLN7u0AnKwHmCx2dQrrUws
 h6J51XZxV5Sdjjsl5ORiw==
X-ME-Sender: <xms:mW-RZUw3VqhSOSEeft4LH_rFpB89TMoTP_JLHEgpYl2bHtTOzUxuLg>
 <xme:mW-RZYTvaUyVXNZeMHEtRAYOgRlSIK5UvdLhHWrDvkvupeXMQNy0MnILRVE-ysIEC
 BQ9rfcb-1gRmmL3C9o>
X-ME-Received: <xmr:mW-RZWXrW_M8Ch8wHkAjKeaZoFphvycF1xPiBXSh_6kYPyC66I5OqrG3Ud5EUZWA9ossFQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdefkedgfedvucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:mW-RZShknw8AwcF_Qvj96ea7bBoPz-Up6sYMOxMSEAYt0w1qvSrREA>
 <xmx:mW-RZWBZ_Rv0Uru6EqURh198ko2eLOygqhab7RVNrb06-b4GkJs5Ug>
 <xmx:mW-RZTLqka7qdklzzGM98mRXOWeG2CbEPc9G0cNLoI7eiLkwLtQa2Q>
 <xmx:mW-RZX7M329Uulc_znypQg47pNMkVpdqd3sbUButhi38ZBkbKhfxyg>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 31 Dec 2023 08:41:44 -0500 (EST)
Message-ID: <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
Date: Sun, 31 Dec 2023 15:41:44 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 31/12/2023 07:35, Noah Peart wrote:
> Yea, I agree that would be better - would you align on start the 
> variable names, or '=' like
> `c-lineup-assignments`?

Like js-mode would be good.

I'm not familiar with c-lineup-assignments, but we could add different 
variations later.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Yuan Fu <casouri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 01 Jan 2024 04:57:01 +0000
Resent-Message-ID: <handler.68054.B68054.17040849851977 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Noah Peart <noah.v.peart@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.17040849851977
          (code B ref 68054); Mon, 01 Jan 2024 04:57:01 +0000
Received: (at 68054) by debbugs.gnu.org; 1 Jan 2024 04:56:25 +0000
Received: from localhost ([127.0.0.1]:47261 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rKALh-0000Vp-2n
	for submit <at> debbugs.gnu.org; Sun, 31 Dec 2023 23:56:25 -0500
Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]:46552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1rKALf-0000Vb-8a
 for 68054 <at> debbugs.gnu.org; Sun, 31 Dec 2023 23:56:23 -0500
Received: by mail-oi1-x233.google.com with SMTP id
 5614622812f47-3bbd6f87959so2094296b6e.1
 for <68054 <at> debbugs.gnu.org>; Sun, 31 Dec 2023 20:56:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1704084976; x=1704689776; darn=debbugs.gnu.org;
 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=m8C/YkiIvyvEk4ta47IOip708gTuKMEsbjEp0laT5Bc=;
 b=hln3x5tyjs0uvbdLR82t0ysRVqOPniA9cKEvY6z+L71oeqARNXkDN6cYZVGmgJf46r
 ZWY+BYV+wC5gYNjmAzO/eYWH6LE71AKje4Sbg8Vef+nh2jcxPqfVkNt2cq6seH+tHLnV
 0YrizgngVALtTMg6eJesrjiPXTZUugNLSXljAYm49aut15OqiXOa5h9JgL7daQ47nMV3
 7jeyyFECmA1YKEsSEfo7nHbmQ3H7cWxhJQ56mBkV1wRNmEYC00LIyZ2Llc2IPKtcuF6U
 QmPIn21UYNwoKsFjJUwZKS4+NHfyrrqmv42SaYKNsHVWzq102tGLfgk1z/KnQ+DrjqmE
 xKRQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1704084976; x=1704689776;
 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=m8C/YkiIvyvEk4ta47IOip708gTuKMEsbjEp0laT5Bc=;
 b=JQLsiB83ujHbIKgHg8k2M6lwK6lr+SVUldErXtvb9NvEM8vO8WZBAsqHqb40sUJcf/
 9A9oDjtvQm3cBb3AaKYFnyN3ftpxCsoB5QJozBfIc6juTkhB/6ZLoXT7RWp0BTfiC3ML
 v2mLFv4PQPW5QY3tgeBZR9uYXFolEewTVFb1xnlGXHGXT1F3vKdv+EwjsXMxQN4+i3yq
 WgObOLY2vpMf++mxy5GxNqYX1xlTtNnjkEQL/lPgBQPvRf8CoqLy32AVHDagau0jWIdf
 xX3ONzW88KcEVenJTOAnqAAlHDnYZBvTJXurmLhuibz4iS0GkBPA1RGy396lJtwbfV5t
 ys/A==
X-Gm-Message-State: AOJu0YwsnTEV1idLMEbt7cTd7HK2S5pIrcyo6mwlXWbZbeAzRTQ8rVBR
 8G7/i4vEztb/FegtfU23w64=
X-Google-Smtp-Source: AGHT+IFU2AifXAL1u6q+QVAKTRDRNY1shYfP0q+CEk0McKx1W1IEUYlZn38RaGn4zAre3mT8xVS4LQ==
X-Received: by 2002:a05:6808:7c3:b0:3ba:951:dd57 with SMTP id
 f3-20020a05680807c300b003ba0951dd57mr13706829oij.107.1704084975886; 
 Sun, 31 Dec 2023 20:56:15 -0800 (PST)
Received: from smtpclient.apple (172-117-161-177.res.spectrum.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 s22-20020a62e716000000b006da105deedesm7395196pfh.197.2023.12.31.20.56.15
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 31 Dec 2023 20:56:15 -0800 (PST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
Date: Sun, 31 Dec 2023 20:56:04 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6)
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Dec 31, 2023, at 5:41 AM, Dmitry Gutov <dmitry@HIDDEN> wrote:
>=20
> On 31/12/2023 07:35, Noah Peart wrote:
>> Yea, I agree that would be better - would you align on start the =
variable names, or '=3D' like
>> `c-lineup-assignments`?
>=20
> Like js-mode would be good.
>=20
> I'm not familiar with c-lineup-assignments, but we could add different =
variations later.

Also, if you are feeling adventurous, I noticed that the second variable =
in a lexical_declaration isn=E2=80=99t fontified in variable-name-face. =
It=E2=80=99d be nice to fix that as well.

Yuan=




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Noah Peart <noah.v.peart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 17 Apr 2024 20:22:02 +0000
Resent-Message-ID: <handler.68054.B68054.17133853032195 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Yuan Fu <casouri@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.17133853032195
          (code B ref 68054); Wed, 17 Apr 2024 20:22:02 +0000
Received: (at 68054) by debbugs.gnu.org; 17 Apr 2024 20:21:43 +0000
Received: from localhost ([127.0.0.1]:47935 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rxBmp-0000ZL-2n
	for submit <at> debbugs.gnu.org; Wed, 17 Apr 2024 16:21:43 -0400
Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]:42456)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noah.v.peart@HIDDEN>) id 1rxBmn-0000YP-0v
 for 68054 <at> debbugs.gnu.org; Wed, 17 Apr 2024 16:21:42 -0400
Received: by mail-oa1-x2a.google.com with SMTP id
 586e51a60fabf-234f5e54446so87982fac.1
 for <68054 <at> debbugs.gnu.org>; Wed, 17 Apr 2024 13:21:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713385282; x=1713990082; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=jPOWWBpnAcTr8YCNf8gjD//np925fIrn8m5Zf4ffsHA=;
 b=CdMXkL/8AxwdGdk27MW4LLlq5BYsFmmWf7Cyv/RsAkSykx05mhQKpR98pM44dnodp4
 pt2e/rsDd+bGcEDtUxjKP+xmnX0AUDFrkxaCIIJSaGB+MpthW4axGZARMYLZp4xuH0mw
 qJeTmtXG0SBzRKjUgy4XlPxF2rDYswQQMkmzLTpa/ucuWicQcv3QKPaskv/hT8bQGOYG
 tJV+b/JnGR6OOlRfyD9/Ya6YJL0EmsA5OwE+ItLMaoola9Eg7ifFKmi0p4SliBEi1y+k
 4pS/uXo5u6rsqZsiPx8rfzmxRB1DkVB52Ja+Q6nWDt5Wq2VZrtIFHWKa5vyoLqRjddUh
 dlOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713385282; x=1713990082;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=jPOWWBpnAcTr8YCNf8gjD//np925fIrn8m5Zf4ffsHA=;
 b=Jb5Yy5jOyfhaZm1QfGn32WW/Lub5iOTL9WwyCSKuJ8r2/fqKP1JnDeVX+ch8WlJJo5
 +d9CbbNCqwKGetlTKD7gKqTpz9HHwUZ5eWJb2EZhR2xmium8w3iTicBLcgjmgMBeK2kc
 1hL15G0JObNxNtY/ZZZ4Q4D6rf9C6NLyCNBNKjyH6QkDlHfzahzUQgzZSRQX9v8cKGcY
 vxz+jLgVJNmMuNh8d/KepbB/vfUxuuUXHNLEXYTzw6BvAD2FfZolTFNmQ+AkXxaR+WfS
 bc26PS9Q6CPuVoxAAXhJx3HsAoYL+tG931BxC91UK4VI1qcF6fDafYb3t83EuNNLhHZf
 /3BA==
X-Forwarded-Encrypted: i=1;
 AJvYcCXbd6MivNW496+vSIJHFrCi4B3kCAZIMCrz45cX/wwqOAZ8BLUgXkORu58wNUvd++snRU6jVJy5EtDCXC/TGCb7RmIqQO8=
X-Gm-Message-State: AOJu0YxAccgL2iFO0KMmki9dwknprGmkD4gJgWr9gABidcTR0Lt68DNy
 9hg2L9Zf4sO+GGlfiNb6+Dmkm1Z7c4+jmrOinM0UZfC7LS41qZhjj2i/PuI+O9IQPkLrkg7C1Jk
 2x/ZyQMBid8EBSagIisUaNMX1x9w=
X-Google-Smtp-Source: AGHT+IE1DgUX6ESpq6Oe045VF+6oCltRWu8akdNMSGgHnLGYl2gpT8Zj7AGU4PiWq1ce3E33KAkoUH95YgZIDjj52+E=
X-Received: by 2002:a05:6870:a451:b0:22e:83e8:2f13 with SMTP id
 n17-20020a056870a45100b0022e83e82f13mr82636oal.24.1713385281857; Wed, 17 Apr
 2024 13:21:21 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
In-Reply-To: <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
From: Noah Peart <noah.v.peart@HIDDEN>
Date: Wed, 17 Apr 2024 13:21:10 -0700
Message-ID: <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
Content-Type: multipart/mixed; boundary="00000000000016c73b0616509977"
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

--00000000000016c73b0616509977
Content-Type: multipart/alternative; boundary="00000000000016c73a0616509975"

--00000000000016c73a0616509975
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Sorry, I forgot about this. I've just added a rule to align the
variable_declarators
in let, var, and const declarations, but I need some feedback about the
indentation
for values in the variable_declarators following dangling '=3D'.

For example, which of the following would be preferable?

1) indent the dangling values with respect to start of the declaration

    const a =3D
        (x: string): string =3D> {
            return x + x;
        },
          bbb =3D
        {
            "x": 0
        },
          cccc =3D
        1,
          ddddd =3D 0;

2) indent them with respect to the start of the variable_declarator

    const a =3D
              (x: string): string =3D> {
                  return x + x;
              },
          bbb =3D
              {
                  "x": 0
              },
          cccc =3D
              1,
          ddddd =3D 0;

3) align with the variable declarators (this is the same as js-mode)

    const a =3D
          (x: string): string =3D> {
              return x + x;
          },
          bbb =3D
          {
              "x": 0
          },
          cccc =3D
          1,
          ddddd =3D 0;

I've attached a patch with with the rules for the 3 options here.

On Sun, Dec 31, 2023 at 8:56=E2=80=AFPM Yuan Fu <casouri@HIDDEN> wrote:

>
>
> > On Dec 31, 2023, at 5:41 AM, Dmitry Gutov <dmitry@HIDDEN> wrote:
> >
> > On 31/12/2023 07:35, Noah Peart wrote:
> >> Yea, I agree that would be better - would you align on start the
> variable names, or '=3D' like
> >> `c-lineup-assignments`?
> >
> > Like js-mode would be good.
> >
> > I'm not familiar with c-lineup-assignments, but we could add different
> variations later.
>
> Also, if you are feeling adventurous, I noticed that the second variable
> in a lexical_declaration isn=E2=80=99t fontified in variable-name-face. I=
t=E2=80=99d be
> nice to fix that as well.
>
> Yuan

--00000000000016c73a0616509975
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Sorry, I forgot about this. I&#39;ve just added a rule to =
align the variable_declarators<div>in let, var, and const declarations, but=
 I need some feedback about the indentation</div><div>for values in the var=
iable_declarators following dangling &#39;=3D&#39;.<div><div><br></div><div=
>For example, which of the following would be preferable?</div><div><br></d=
iv><div>1) indent the dangling values with respect to start of the declarat=
ion</div><div><br>=C2=A0 =C2=A0 const a =3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
(x: string): string =3D&gt; {<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
return x + x;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 bbb =3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 {<br>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 &quot;x&quot;: 0<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cccc =3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 1,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ddddd =3D 0;<br>=C2=A0=C2=A0<br><=
/div><div>2) indent them with respect to the start of the variable_declarat=
or<br></div><div><br></div><div>=C2=A0 =C2=A0 const a =3D<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (x: string): string =3D&gt; {<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return x + x;<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 bbb =3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
{<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;x=
&quot;: 0<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 cccc =3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 1,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ddddd =3D 0;<br></di=
v></div></div><div><br></div><div>3) align with the variable declarators (t=
his is the same as js-mode)</div><div><br></div><div>=C2=A0 =C2=A0 const a =
=3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (x: string): string =3D&gt; {<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return x + x;<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bbb =
=3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 &quot;x&quot;: 0<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 },<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cccc =3D<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 1,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ddddd =3D 0;<br></di=
v><div><br></div><div>I&#39;ve attached a patch with with the rules for the=
 3 options here.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr"=
 class=3D"gmail_attr">On Sun, Dec 31, 2023 at 8:56=E2=80=AFPM Yuan Fu &lt;<=
a href=3D"mailto:casouri@HIDDEN">casouri@HIDDEN</a>&gt; wrote:<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
&gt; On Dec 31, 2023, at 5:41 AM, Dmitry Gutov &lt;<a href=3D"mailto:dmitry=
@gutov.dev" target=3D"_blank">dmitry@HIDDEN</a>&gt; wrote:<br>
&gt; <br>
&gt; On 31/12/2023 07:35, Noah Peart wrote:<br>
&gt;&gt; Yea, I agree that would be better - would you align on start the v=
ariable names, or &#39;=3D&#39; like<br>
&gt;&gt; `c-lineup-assignments`?<br>
&gt; <br>
&gt; Like js-mode would be good.<br>
&gt; <br>
&gt; I&#39;m not familiar with c-lineup-assignments, but we could add diffe=
rent variations later.<br>
<br>
Also, if you are feeling adventurous, I noticed that the second variable in=
 a lexical_declaration isn=E2=80=99t fontified in variable-name-face. It=E2=
=80=99d be nice to fix that as well.<br>
<br>
Yuan</blockquote></div>

--00000000000016c73a0616509975--

--00000000000016c73b0616509977
Content-Type: text/x-patch; charset="US-ASCII"; name="typescript-ts-decl-indent.patch"
Content-Disposition: attachment; filename="typescript-ts-decl-indent.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_lv49byd80>
X-Attachment-Id: f_lv49byd80

ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbCBiL2xpc3Av
cHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbAppbmRleCBhYjFkNzZhYjIwZS4uOWRiZTVk
ZjgzNjggMTAwNjQ0Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbAor
KysgYi9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUuZWwKQEAgLTkxLDYgKzkxLDE2
IEBAIHRzeC10cy1tb2RlLS1pbmRlbnQtY29tcGF0aWJpbGl0eS1iODkzNDI2CiAgICAgIGAoKCht
YXRjaCAiPCIgImpzeF90ZXh0IikgcGFyZW50IDApCiAgICAgICAgKChwYXJlbnQtaXMgImpzeF90
ZXh0IikgcGFyZW50IHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KSkpKSkKIAorKGRl
ZnVuIHR5cGVzY3JpcHQtdHMtbW9kZS0tYW5jaG9yLWRlY2wgKF9uIHBhcmVudCAmcmVzdCBfKQor
ICAiUmV0dXJuIHRoZSBwb3NpdGlvbiBhZnRlciB0aGUgZGVjbGFyYXRpb24ga2V5d29yZCBiZWZv
cmUgUEFSRU5ULgorCitUaGlzIGFuY2hvciBhbGxvd3MgYWxpZ25pbmcgdmFyaWFibGVfZGVjbGFy
YXRvcnMgaW4gdmFyaWFibGUgYW5kIGxleGljYWwKK2RlY2xhcmF0aW9ucywgYWNjb3VudGluZyBm
b3IgdGhlIGxlbmd0aCBvZiBrZXl3b3JkICh2YXIsIGxldCwgb3IgY29uc3QpLiIKKyAgKGxldCAo
KGRlY2wgKHRyZWVzaXQtcGFyZW50LXVudGlsCisgICAgICAgICAgICAgICBwYXJlbnQgKHJ4IChv
ciAidmFyaWFibGUiICJsZXhpY2FsIikgIl9kZWNsYXJhdGlvbiIpIHQpKSkKKyAgICAoKyAodHJl
ZXNpdC1ub2RlLXN0YXJ0IGRlY2wpCisgICAgICAgKGxlbmd0aCAodHJlZXNpdC1ub2RlLXRleHQg
KHRyZWVzaXQtbm9kZS1jaGlsZCBkZWNsIDApKSkpKSkKKwogKGRlZnVuIHR5cGVzY3JpcHQtdHMt
bW9kZS0taW5kZW50LXJ1bGVzIChsYW5ndWFnZSkKICAgIlJ1bGVzIHVzZWQgZm9yIGluZGVudGF0
aW9uLgogQXJndW1lbnQgTEFOR1VBR0UgaXMgZWl0aGVyIGB0eXBlc2NyaXB0JyBvciBgdHN4Jy4i
CkBAIC0xMTMsNyArMTIzLDI0IEBAIHR5cGVzY3JpcHQtdHMtbW9kZS0taW5kZW50LXJ1bGVzCiAg
ICAgICgocGFyZW50LWlzICJzd2l0Y2hfY2FzZSIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1t
b2RlLWluZGVudC1vZmZzZXQpCiAgICAgICgocGFyZW50LWlzICJzd2l0Y2hfZGVmYXVsdCIpIHBh
cmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAgICgocGFyZW50
LWlzICJ0eXBlX2FyZ3VtZW50cyIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVu
dC1vZmZzZXQpCi0gICAgICgocGFyZW50LWlzICJ2YXJpYWJsZV9kZWNsYXJhdG9yIikgcGFyZW50
LWJvbCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkKKworICAgICA7OyAxLiBpbmRl
bnQgd2l0aCByZXNwZWN0IHRvIGRlY2xhcmF0aW9uIHN0YXJ0OgorICAgICAoKHBhcmVudC1pcyAi
dmFyaWFibGVfZGVjbGFyYXRvciIpIGdyYW5kLXBhcmVudCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5k
ZW50LW9mZnNldCkKKyAgICAgKChwYXJlbnQtaXMgLChyeCAob3IgInZhcmlhYmxlIiAibGV4aWNh
bCIpICJfZGVjbGFyYXRpb24iKSkKKyAgICAgIHR5cGVzY3JpcHQtdHMtbW9kZS0tYW5jaG9yLWRl
Y2wgMSkKKworICAgICA7OyAyLiBpbmRlbnQgd2l0aCByZXNwZWN0IHRvIHZhcmlhYmxlX2RlY2xh
cmF0b3Igc3RhcnQ6CisgICAgICgobWF0Y2ggbmlsICJ2YXJpYWJsZV9kZWNsYXJhdG9yIiBuaWwg
MCAxKQorICAgICAgcGFyZW50LWJvbCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkK
KyAgICAgKChuLXAtZ3AgbmlsICJ2YXJpYWJsZV9kZWNsYXJhdG9yIiAsKHJ4IChvciAidmFyaWFi
bGUiICJsZXhpY2FsIikgIl9kZWNsYXJhdGlvbiIpKQorICAgICAgcGFyZW50IHR5cGVzY3JpcHQt
dHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQorICAgICAoKHBhcmVudC1pcyAsKHJ4IChvciAidmFyaWFi
bGUiICJsZXhpY2FsIikgIl9kZWNsYXJhdGlvbiIpKQorICAgICAgdHlwZXNjcmlwdC10cy1tb2Rl
LS1hbmNob3ItZGVjbCAxKQorCisgICAgIDs7IDMuIGFsaWduIHdpdGggdmFyaWFibGUgZGVjbGFy
YXRvciAobGlrZSBqcy1tb2RlKQorICAgICAoKHBhcmVudC1pcyAsKHJ4IChvciAidmFyaWFibGUi
ICJsZXhpY2FsIikgIl8iIChvciAiZGVjbGFyYXRpb24iICJkZWNsYXJhdG9yIikpKQorICAgICAg
dHlwZXNjcmlwdC10cy1tb2RlLS1hbmNob3ItZGVjbCAxKQorCiAgICAgICgocGFyZW50LWlzICJh
cmd1bWVudHMiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQog
ICAgICAoKHBhcmVudC1pcyAiYXJyYXkiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1p
bmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAiZm9ybWFsX3BhcmFtZXRlcnMiKSBwYXJl
bnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQo=
--00000000000016c73b0616509977--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Yuan Fu <casouri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Apr 2024 05:08:02 +0000
Resent-Message-ID: <handler.68054.B68054.171384888020655 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Noah Peart <noah.v.peart@HIDDEN>
Cc: Dmitry Gutov <dmitry@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.171384888020655
          (code B ref 68054); Tue, 23 Apr 2024 05:08:02 +0000
Received: (at 68054) by debbugs.gnu.org; 23 Apr 2024 05:08:00 +0000
Received: from localhost ([127.0.0.1]:49857 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rz8Nq-0005Mp-OA
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 01:07:59 -0400
Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:60794)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1rz8Nn-0005Lv-5f
 for 68054 <at> debbugs.gnu.org; Tue, 23 Apr 2024 01:07:57 -0400
Received: by mail-pf1-x42f.google.com with SMTP id
 d2e1a72fcca58-6ed32341906so5013489b3a.1
 for <68054 <at> debbugs.gnu.org>; Mon, 22 Apr 2024 22:07:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713848853; x=1714453653; darn=debbugs.gnu.org;
 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=IXuknr/4v4+uq9cEbbP8ay//dgnepy8FCtxHm9nuS7E=;
 b=hvi5oJMvwfF9z9Rf7Z5UjkiM9U/hHV0x2xhikiioOSn0lT5CAAXP0GjutP/V6gN3fo
 g3YObTMnCsokuPIk0AsnJWSsxbN3EuYZNCwPgsRTbHLqeihkB0zSThi9Kn1hQRb1ECK7
 6q8mWszNkEPbprTxYcYOvkMlMaCKdH4N3M1KjnmVRfUCDLHPSs5ExP0LgRoX4j4LoY7Z
 B6KUA9731CumYJJphZw821X8mD2K1Fjs5mlZxKzEth26aHfAlfqN/IaskjYH7AXbAaCA
 g9rxl7oS8uhLiZ2EYF8cU5pOIQgeoE6InSTdbHwurPcL/54WhX0wH356XBWnNLofY1/i
 Bkyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713848853; x=1714453653;
 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=IXuknr/4v4+uq9cEbbP8ay//dgnepy8FCtxHm9nuS7E=;
 b=ctTn3GZh7X5fb4BV1AwnhWPRsuGkI72sBvurAvoSCNucU5jPaiQMlQe315g0TTMGUp
 AeViC2D/jg29dMJGq+iA8bc/ZKjqK32jZWgXiIiLUJQXf6nR6IsKt7+AWKxVFQOdmIIk
 k1Nup7gYZKlUDBaJtQ6KwgWgS4yxbpEKS0pwfTPA9dxTpjnalyB0uTao8vRxzdBfsiGh
 Ar8MHTOFGSVXU/F0mE1iwusLG6DJywBVxWT1PaQSn5XT5AMfBFwznVg+iPiQlTfgQwVb
 6//3aFwJQ4WkZ10/Uf8it0hKWF2jI3aD9Jc5F5rO8wxUvBguyN+h+gMm+MMYef3cnOUT
 ks/A==
X-Forwarded-Encrypted: i=1;
 AJvYcCXmvRKMO67teyU+UrZeWBF0AetpC81ylMs0D4ZQGzB1Ygoejf37v4EOjZoTdjOU6Dt+4DwzLAt83Us4sioXhsm+mUGFMwk=
X-Gm-Message-State: AOJu0YxyL/vYJ1C0E14CeXulbZUndW9aqlAAOVzClsH4b/Usb5vTqeZf
 ZwbN7En4Gd5HQINVKZxRoRRaKqGwaLSWvloPkDbcIcF1bqLXL946
X-Google-Smtp-Source: AGHT+IGTjSZVRl3z/sWl/psXY/ef1O8xClq614r0/bg1NHBFgEs9U/sE05fJ8HvlQkG2VJuFnjTqyQ==
X-Received: by 2002:a05:6a00:2181:b0:6ee:1508:edd4 with SMTP id
 h1-20020a056a00218100b006ee1508edd4mr15664906pfi.7.1713848852695; 
 Mon, 22 Apr 2024 22:07:32 -0700 (PDT)
Received: from smtpclient.apple ([2601:641:300:4910:e4f6:f0b8:c91d:e40b])
 by smtp.gmail.com with ESMTPSA id
 d2-20020aa78142000000b006ed007b3596sm8757317pfn.69.2024.04.22.22.07.31
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 22 Apr 2024 22:07:32 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
Date: Mon, 22 Apr 2024 22:07:20 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 17, 2024, at 1:21 PM, Noah Peart <noah.v.peart@HIDDEN> =
wrote:
>=20
> Sorry, I forgot about this. I've just added a rule to align the =
variable_declarators
> in let, var, and const declarations, but I need some feedback about =
the indentation
> for values in the variable_declarators following dangling '=3D'.

Thanks!

>=20
> For example, which of the following would be preferable?
>=20
> 1) indent the dangling values with respect to start of the declaration
>=20
>     const a =3D
>         (x: string): string =3D> {
>             return x + x;
>         },
>           bbb =3D
>         {
>             "x": 0
>         },
>           cccc =3D
>         1,
>           ddddd =3D 0;
>  =20
> 2) indent them with respect to the start of the variable_declarator
>=20
>     const a =3D
>               (x: string): string =3D> {
>                   return x + x;
>               },
>           bbb =3D
>               {
>                   "x": 0
>               },
>           cccc =3D
>               1,
>           ddddd =3D 0;
>=20
> 3) align with the variable declarators (this is the same as js-mode)
>=20
>     const a =3D
>           (x: string): string =3D> {
>               return x + x;
>           },
>           bbb =3D
>           {
>               "x": 0
>           },
>           cccc =3D
>           1,
>           ddddd =3D 0;
>=20
> I've attached a patch with with the rules for the 3 options here.

I don=E2=80=99t really know what=E2=80=99s the convention, if there is =
one. Maybe Dmitry has better idea. Personally I like option 1.

Yuan=




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 24 Apr 2024 00:16:05 +0000
Resent-Message-ID: <handler.68054.B68054.171391773919595 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Yuan Fu <casouri@HIDDEN>, Noah Peart <noah.v.peart@HIDDEN>
Cc: 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.171391773919595
          (code B ref 68054); Wed, 24 Apr 2024 00:16:05 +0000
Received: (at 68054) by debbugs.gnu.org; 24 Apr 2024 00:15:39 +0000
Received: from localhost ([127.0.0.1]:55151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzQIU-00055z-QS
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 20:15:39 -0400
Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:41277)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rzQIQ-00054G-By
 for 68054 <at> debbugs.gnu.org; Tue, 23 Apr 2024 20:15:37 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailfout.nyi.internal (Postfix) with ESMTP id 000BC138011A;
 Tue, 23 Apr 2024 20:15:11 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute4.internal (MEProxy); Tue, 23 Apr 2024 20:15:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1713917711;
 x=1714004111; bh=2DhB3gForYNnQzOJSNNGKX13hWOjiRICHI+PjAcZ/gY=; b=
 Li7WdwKx3lbsHqmKUKElgab3SLxweHx6deQ87qle99fRu8RxzSzn586O97i+bO0X
 ECp8Wt5LrZFJ/6tZGA23/U6FwzHABNgT8pvekniwUM36Elwb6qoQwAp45r3UNhpr
 iKX6no/hcmE9qf3ghnjBuDLf5js81bBwSQXlEstY6TxeMZ7IJh6/J7f7g2He9l1q
 aesb04P/AWRdwpoBzGAbpAHGSpaFM+8Jh0iY71xiG7JQzq4+rdZLOSTUvqyXsJuH
 laqdjLeur+3v7esMuT2CX2GqNVbbcjM0oOg+ovMWQDgIP6ZMG3ivOLMtNxih/qQU
 wsdJrdhaAE35P0t+DioRKw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1713917711; x=
 1714004111; bh=2DhB3gForYNnQzOJSNNGKX13hWOjiRICHI+PjAcZ/gY=; b=F
 bM5feBGS6OvLkaYG9ft9ll2qtmHz6gyDktp86fCSXEXqkYuDwPfYLBEgQ7gj4vKa
 YstsBMN9YfnwGxu4Ve7WcJ0puQacm5cRShgCM8+HiKpXXfC5AwXpaT1RpXEEAHJy
 FnBelvqJt/zx17AQeuTDUXFUIdxSXGOnz7nNU0xDSHYcgh5QA638Se2kPqrOXaxK
 tx4bURhV395s6uLKgmzVA7xLMwNasqTnhu6RYGKrGgdq5NCOtS7Nl564SmPDQESD
 J5nTePJSaHHYA7vVIHP4tnern7lG5hwWMyCcEwMo0xkXaXW7nOZ9rJuBqpNnxnVL
 M+3lfkegG9Tlio9yPlC0A==
X-ME-Sender: <xms:D08oZsoB7gRjyJJduml4A2X5FERBOn4sSurNxY6ow_CIFrLybiXb8Q>
 <xme:D08oZipbIAmZkV3B_pgLS5B3Zszx4bpDW9m6RFaWlXlU9g87f1r-FNCeYDxzV1HPL
 m8XqdKyg6n_gHIcxl4>
X-ME-Received: <xmr:D08oZhPlxmKixoyKk-4C7vr3w-K1J9EsXq0GssXY14g-oGlUogaaPBa1AKJfCOewAbK->
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelvddgfeefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveegtedthefhudekteehffeu
 keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:D08oZj4H5qwCbMM32p1zcTrdtsqCCBFlywp0Qwb26eZeYfsAWQ6sOg>
 <xmx:D08oZr6N3vU6tWgu9_7bLKOf-e_T2AWpucVWpielfO-32kdehVc-aA>
 <xmx:D08oZjiqKZN621eLl94UGkX19N7MsPBaGQWeCgMeNKyUPAALxTlXmA>
 <xmx:D08oZl5b6QVc21B61GbP8PAyDoH5L_rlkVDzGSn30Ex1Vm8nT4FnhA>
 <xmx:D08oZtke2CCYDOUvEPS_QSKYMPIQJNGay0ZqUM-IJY1zG5185r_LGOM_>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 23 Apr 2024 20:15:10 -0400 (EDT)
Message-ID: <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
Date: Wed, 24 Apr 2024 03:15:08 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
 <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 23/04/2024 08:07, Yuan Fu wrote:
>> 1) indent the dangling values with respect to start of the declaration
>>
>>      const a =
>>          (x: string): string => {
>>              return x + x;
>>          },
>>            bbb =
>>          {
>>              "x": 0
>>          },
>>            cccc =
>>          1,
>>            ddddd = 0;
>>    
>> 2) indent them with respect to the start of the variable_declarator
>>
>>      const a =
>>                (x: string): string => {
>>                    return x + x;
>>                },
>>            bbb =
>>                {
>>                    "x": 0
>>                },
>>            cccc =
>>                1,
>>            ddddd = 0;
>>
>> 3) align with the variable declarators (this is the same as js-mode)
>>
>>      const a =
>>            (x: string): string => {
>>                return x + x;
>>            },
>>            bbb =
>>            {
>>                "x": 0
>>            },
>>            cccc =
>>            1,
>>            ddddd = 0;
>>
>> I've attached a patch with with the rules for the 3 options here.
> I don’t really know what’s the convention, if there is one. Maybe Dmitry has better idea. Personally I like option 1.

What js-mode does (looks like 3) shouldn't be too bad, but I wouldn't 
mind an extra indentation level for such cases, too (example 2).

This seems like a rare enough case, so it probably doesn't matter too 
much, so I'd suggest picking one style and implementing it, and then 
adjusting based on user feedback later.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Noah Peart <noah.v.peart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 24 Apr 2024 02:38:09 +0000
Resent-Message-ID: <handler.68054.B68054.171392626417025 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.171392626417025
          (code B ref 68054); Wed, 24 Apr 2024 02:38:09 +0000
Received: (at 68054) by debbugs.gnu.org; 24 Apr 2024 02:37:44 +0000
Received: from localhost ([127.0.0.1]:55755 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzSVn-0004Ob-ME
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 22:37:42 -0400
Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]:53631)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noah.v.peart@HIDDEN>) id 1rzSVc-0004Li-Bm
 for 68054 <at> debbugs.gnu.org; Tue, 23 Apr 2024 22:37:28 -0400
Received: by mail-oa1-x29.google.com with SMTP id
 586e51a60fabf-22ed075a629so2550900fac.3
 for <68054 <at> debbugs.gnu.org>; Tue, 23 Apr 2024 19:37:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713926217; x=1714531017; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=ch0kXSUE9wxQkpF4dDHtmA/R8uJEt4uKmFdZOW7lBWg=;
 b=GCz08UoaHmC6DsHZ2GujVkmxAnfSvrDsNuaoonhDw+T0a+jS880XwXTzws5UeaGIxH
 pj2j4bDznFhW/+6O8dSn0e9fYehDzAzWY8kusY94eptdae4padIbSmuIbGZ0gBvWT3Xh
 CINxNGVulv3655nAmNZPzBFziOmUfUfkZU/zCic7Fz20f1XdSmTRne+16cMgdbfU5kee
 +XNs0SNySoQdsQTk+FMCsrvvLHPKVSqrI8x7Eh7sNe7Q0WqcAmHChUqvizRKYAFTFQmv
 Ljl8vMaX8ugQVxIvpH9l3PmmwgqcgGD5fOSLsg5E476PHLSyQaMB4kH7r2gBt+Qn5+3k
 c9xA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713926218; x=1714531018;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=ch0kXSUE9wxQkpF4dDHtmA/R8uJEt4uKmFdZOW7lBWg=;
 b=TodNC3xRRKG+o6/qc9SCvqjr6CdjRjRbaMj+3keebmv7PA+K28SQCytjbYh/yxhps3
 zZCkPmoYaChBvpc3qozPDyMpHP2tZ1a6SW9+c038hJG/groFQcqgukl3O9XFGuRKTOKC
 X/ms9QdhpH0UvY7HHTxFhtNrOpXD2bU+R++NhQ37qYMw+naL0gE3mCo+LBOcL6D2/EG9
 QvHVfIDGl22PvBluGbQnSqsN+/VtMiCYZ+wZjMKEb0npzWIEtIlrAsA2x80Km6Ekm+qa
 vdoxZMb0LmwK4iYVV5dwqtH7FLsrNTWixZJSA9PsuOIspN5aHGMVYrIpJickq3cyzmac
 ypDw==
X-Forwarded-Encrypted: i=1;
 AJvYcCWKDBQThXlRU5yNm3bL6B0czDCqpSHtDnnvEzW0NmGO8Al1V4sf8JMn/abKGF6WaN2IbVDuKj/GQxmywahwMWRmmqcoW84=
X-Gm-Message-State: AOJu0YzeasXUBah4p04Q4UkMng7Dwe4Lj7e/c/VNhcs2gt9T5+gY7wlj
 iw7WL0vYP7fVixO45K/Wl41QnNMnVj18qiaiMd1h/1CW82w85Ri8xZDHAM2TKqPsFGYWDykLHHb
 CczFsYHjLVCsHBOcI0FzUGR2UF0Y=
X-Google-Smtp-Source: AGHT+IFdsBFYJibnNJpL5sztNG2+b/wJ8YA4F+f/BngFBYMnrxba/mbqYU8eGB67ghKKRcuyyXLqNVCQCeByRhkUHfE=
X-Received: by 2002:a05:6870:3104:b0:22e:959b:cf74 with SMTP id
 v4-20020a056870310400b0022e959bcf74mr1166551oaa.40.1713926217328; Tue, 23 Apr
 2024 19:36:57 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
 <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
 <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
In-Reply-To: <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
From: Noah Peart <noah.v.peart@HIDDEN>
Date: Tue, 23 Apr 2024 19:36:45 -0700
Message-ID: <CAPVBTSd+TcBx=Qvq0177syGnMKaRMtMd2sd1o83C=iNEWTUmkg@HIDDEN>
Content-Type: multipart/mixed; boundary="0000000000005b0b060616ce8b96"
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

--0000000000005b0b060616ce8b96
Content-Type: multipart/alternative; boundary="0000000000005b0b040616ce8b94"

--0000000000005b0b040616ce8b94
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> What js-mode does (looks like 3) shouldn't be too bad, but I wouldn't
mind an extra indentation level for such cases, too (example 2).

The problem I found with option 2/3 was cases like the following (which
also seem like the most common) where I expect the start of
the function be indented according to `typescript-ts-mode-indent-offset`,
not with the declaration keyword "const" as in `js-mode` (and option 3).

    const someFuncWithReallyLongName =3D
      async (x: number, y: number, z: number): Promise<void> =3D> {
        // ...
      };

> This seems like a rare enough case, so it probably doesn't matter too
much, so I'd suggest picking one style and implementing it, and then
adjusting based on user feedback later.

I've attached a patch implementing option 1 for now (with a test), but
I'm happy to change the style whenever.

Thanks!

On Tue, Apr 23, 2024 at 5:15=E2=80=AFPM Dmitry Gutov <dmitry@HIDDEN> wro=
te:

> On 23/04/2024 08:07, Yuan Fu wrote:
> >> 1) indent the dangling values with respect to start of the declaration
> >>
> >>      const a =3D
> >>          (x: string): string =3D> {
> >>              return x + x;
> >>          },
> >>            bbb =3D
> >>          {
> >>              "x": 0
> >>          },
> >>            cccc =3D
> >>          1,
> >>            ddddd =3D 0;
> >>
> >> 2) indent them with respect to the start of the variable_declarator
> >>
> >>      const a =3D
> >>                (x: string): string =3D> {
> >>                    return x + x;
> >>                },
> >>            bbb =3D
> >>                {
> >>                    "x": 0
> >>                },
> >>            cccc =3D
> >>                1,
> >>            ddddd =3D 0;
> >>
> >> 3) align with the variable declarators (this is the same as js-mode)
> >>
> >>      const a =3D
> >>            (x: string): string =3D> {
> >>                return x + x;
> >>            },
> >>            bbb =3D
> >>            {
> >>                "x": 0
> >>            },
> >>            cccc =3D
> >>            1,
> >>            ddddd =3D 0;
> >>
> >> I've attached a patch with with the rules for the 3 options here.
> > I don=E2=80=99t really know what=E2=80=99s the convention, if there is =
one. Maybe Dmitry
> has better idea. Personally I like option 1.
>
> What js-mode does (looks like 3) shouldn't be too bad, but I wouldn't
> mind an extra indentation level for such cases, too (example 2).
>
> This seems like a rare enough case, so it probably doesn't matter too
> much, so I'd suggest picking one style and implementing it, and then
> adjusting based on user feedback later.
>

--0000000000005b0b040616ce8b94
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; What js-mode does (looks like 3) shouldn&#39;t be too=
 bad, but I wouldn&#39;t<br>mind an extra indentation level for such cases,=
 too (example 2).<br><div><br></div><div>The problem I found with option 2/=
3 was cases like the following (which</div><div>also seem like the most com=
mon) where I expect the start of</div><div>the function be indented accordi=
ng to `typescript-ts-mode-indent-offset`,</div><div>not with the declaratio=
n keyword &quot;const&quot; as in `js-mode` (and option 3).</div><div><br><=
/div><div>=C2=A0 =C2=A0 const someFuncWithReallyLongName =3D<br>=C2=A0 =C2=
=A0 =C2=A0 async (x: number, y: number, z: number): Promise&lt;void&gt; =3D=
&gt; {<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 // ...<br>=C2=A0 =C2=A0 =C2=A0 };<br>=
</div><div><br></div><div>&gt; This seems like a rare enough case, so it pr=
obably doesn&#39;t matter too</div>much, so I&#39;d suggest picking one sty=
le and implementing it, and then<br>adjusting based on user feedback later.=
<div class=3D"gmail-yj6qo"></div><br class=3D"gmail-Apple-interchange-newli=
ne"><div>I&#39;ve attached a patch implementing option 1 for now (with a te=
st), but=C2=A0</div><div>I&#39;m happy to change the style whenever.</div><=
div><br></div><div>Thanks!<br></div></div><br><div class=3D"gmail_quote"><d=
iv dir=3D"ltr" class=3D"gmail_attr">On Tue, Apr 23, 2024 at 5:15=E2=80=AFPM=
 Dmitry Gutov &lt;<a href=3D"mailto:dmitry@HIDDEN">dmitry@HIDDEN</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 23=
/04/2024 08:07, Yuan Fu wrote:<br>
&gt;&gt; 1) indent the dangling values with respect to start of the declara=
tion<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 const a =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (x: string): string =3D&gt; {<br=
>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return x + x;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bbb =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;x&quot;: 0<b=
r>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cccc =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1,<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ddddd =3D 0;<br>
&gt;&gt;=C2=A0 =C2=A0 <br>
&gt;&gt; 2) indent them with respect to the start of the variable_declarato=
r<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 const a =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (x: string)=
: string =3D&gt; {<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 return x + x;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bbb =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 &quot;x&quot;: 0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cccc =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1,<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ddddd =3D 0;<br>
&gt;&gt;<br>
&gt;&gt; 3) align with the variable declarators (this is the same as js-mod=
e)<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 const a =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (x: string): string =3D&g=
t; {<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return x + =
x;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bbb =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;x&quo=
t;: 0<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 },<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cccc =3D<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1,<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ddddd =3D 0;<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve attached a patch with with the rules for the 3 options he=
re.<br>
&gt; I don=E2=80=99t really know what=E2=80=99s the convention, if there is=
 one. Maybe Dmitry has better idea. Personally I like option 1.<br>
<br>
What js-mode does (looks like 3) shouldn&#39;t be too bad, but I wouldn&#39=
;t <br>
mind an extra indentation level for such cases, too (example 2).<br>
<br>
This seems like a rare enough case, so it probably doesn&#39;t matter too <=
br>
much, so I&#39;d suggest picking one style and implementing it, and then <b=
r>
adjusting based on user feedback later.<br>
</blockquote></div>

--0000000000005b0b040616ce8b94--

--0000000000005b0b060616ce8b96
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Add-typescript-ts-mode-indentation-for-multi-assignm.patch"
Content-Disposition: attachment; 
	filename="0001-Add-typescript-ts-mode-indentation-for-multi-assignm.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_lvd7bbkb0>
X-Attachment-Id: f_lvd7bbkb0

RnJvbSBmMjAyMzU1MDQ4YzhkOTE1YzY5NzhmNmU5MzAwZGQ2MzEwNGI4YTUyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBOb2FoIFBlYXJ0IDxub2FoLnYucGVhcnRAZ21haWwuY29tPgpE
YXRlOiBGcmksIDE5IEFwciAyMDI0IDAxOjQ2OjUwIC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gQWRk
IHR5cGVzY3JpcHQtdHMtbW9kZSBpbmRlbnRhdGlvbiBmb3IgbXVsdGktYXNzaWdubWVudCBkZWNs
cwoKKiBsaXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUuZWwKKHR5cGVzY3JpcHQtdHMt
bW9kZS0taW5kZW50LXJ1bGVzKTogQWRkIGluZGVudGF0aW9uIHJ1bGVzIGZvcgpsZXhpY2FsIGFu
ZCB2YXJpYWJsZSBkZWNsYXJhdGlvbnMgd2l0aCBtdWx0aXBsZSBhc3NpZ25tZW50cy4KKiB0ZXN0
L2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNvdXJjZXMvaW5kZW50LmVydHM6
CkFkZCBpbmRlbnQgdGVzdCBmb3IgdmFyaWFibGUgZGVjbGFyYXRpb25zLgotLS0KIC5sYXN0LWJ1
aWxkLWhhc2ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAxICsKIGxpc3AvcHJvZ21v
ZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbCAgICAgICAgICB8IDE1ICsrKysrKysrKy0KIC4uLi90
eXBlc2NyaXB0LXRzLW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzICB8IDI4ICsrKysrKysrKysr
KysrKysrKysKIDMgZmlsZXMgY2hhbmdlZCwgNDMgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbigt
KQogY3JlYXRlIG1vZGUgMTAwNjQ0IC5sYXN0LWJ1aWxkLWhhc2gKCmRpZmYgLS1naXQgYS8ubGFz
dC1idWlsZC1oYXNoIGIvLmxhc3QtYnVpbGQtaGFzaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRl
eCAwMDAwMDAwMDAwMC4uNzdmZTQ0NDZkZjUKLS0tIC9kZXYvbnVsbAorKysgYi8ubGFzdC1idWls
ZC1oYXNoCkBAIC0wLDAgKzEgQEAKK2EyZTMyN2NiY2ExZTc1NjM3MzEwOWQ0Nzg4ZWE2MzUyNTBk
MjMyMjQKZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbCBi
L2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbAppbmRleCBhYjFkNzZhYjIwZS4u
M2MxMGExOWU3MTIgMTAwNjQ0Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9k
ZS5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUuZWwKQEAgLTkxLDYg
KzkxLDE3IEBAIHRzeC10cy1tb2RlLS1pbmRlbnQtY29tcGF0aWJpbGl0eS1iODkzNDI2CiAgICAg
IGAoKChtYXRjaCAiPCIgImpzeF90ZXh0IikgcGFyZW50IDApCiAgICAgICAgKChwYXJlbnQtaXMg
ImpzeF90ZXh0IikgcGFyZW50IHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KSkpKSkK
IAorKGRlZnVuIHR5cGVzY3JpcHQtdHMtbW9kZS0tYW5jaG9yLWRlY2wgKF9uIHBhcmVudCAmcmVz
dCBfKQorICAiUmV0dXJuIHRoZSBwb3NpdGlvbiBhZnRlciB0aGUgZGVjbGFyYXRpb24ga2V5d29y
ZCBiZWZvcmUgUEFSRU5ULgorCitUaGlzIGFuY2hvciBhbGxvd3MgYWxpZ25pbmcgdmFyaWFibGVf
ZGVjbGFyYXRvcnMgaW4gdmFyaWFibGUgYW5kIGxleGljYWwKK2RlY2xhcmF0aW9ucywgYWNjb3Vu
dGluZyBmb3IgdGhlIGxlbmd0aCBvZiBrZXl3b3JkICh2YXIsIGxldCwgb3IgY29uc3QpLiIKKyAg
KGxldCogKChkZWNsYXJhdGlvbiAodHJlZXNpdC1wYXJlbnQtdW50aWwKKyAgICAgICAgICAgICAg
ICAgICAgICAgcGFyZW50IChyeCAob3IgInZhcmlhYmxlIiAibGV4aWNhbCIpICJfZGVjbGFyYXRp
b24iKSB0KSkKKyAgICAgICAgIChkZWNsICh0cmVlc2l0LW5vZGUtY2hpbGQgZGVjbGFyYXRpb24g
MCkpKQorICAgICgrICh0cmVlc2l0LW5vZGUtc3RhcnQgZGVjbGFyYXRpb24pCisgICAgICAgKC0g
KHRyZWVzaXQtbm9kZS1lbmQgZGVjbCkgKHRyZWVzaXQtbm9kZS1zdGFydCBkZWNsKSkpKSkKKwog
KGRlZnVuIHR5cGVzY3JpcHQtdHMtbW9kZS0taW5kZW50LXJ1bGVzIChsYW5ndWFnZSkKICAgIlJ1
bGVzIHVzZWQgZm9yIGluZGVudGF0aW9uLgogQXJndW1lbnQgTEFOR1VBR0UgaXMgZWl0aGVyIGB0
eXBlc2NyaXB0JyBvciBgdHN4Jy4iCkBAIC0xMTMsNyArMTI0LDkgQEAgdHlwZXNjcmlwdC10cy1t
b2RlLS1pbmRlbnQtcnVsZXMKICAgICAgKChwYXJlbnQtaXMgInN3aXRjaF9jYXNlIikgcGFyZW50
LWJvbCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkKICAgICAgKChwYXJlbnQtaXMg
InN3aXRjaF9kZWZhdWx0IikgcGFyZW50LWJvbCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9m
ZnNldCkKICAgICAgKChwYXJlbnQtaXMgInR5cGVfYXJndW1lbnRzIikgcGFyZW50LWJvbCB0eXBl
c2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkKLSAgICAgKChwYXJlbnQtaXMgInZhcmlhYmxl
X2RlY2xhcmF0b3IiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0
KQorICAgICAoKHBhcmVudC1pcyAidmFyaWFibGVfZGVjbGFyYXRvciIpIGdyYW5kLXBhcmVudCB0
eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkKKyAgICAgKChwYXJlbnQtaXMgLChyeCAo
b3IgInZhcmlhYmxlIiAibGV4aWNhbCIpICJfZGVjbGFyYXRpb24iKSkKKyAgICAgIHR5cGVzY3Jp
cHQtdHMtbW9kZS0tYW5jaG9yLWRlY2wgMSkKICAgICAgKChwYXJlbnQtaXMgImFyZ3VtZW50cyIp
IHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAgICgocGFy
ZW50LWlzICJhcnJheSIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZz
ZXQpCiAgICAgICgocGFyZW50LWlzICJmb3JtYWxfcGFyYW1ldGVycyIpIHBhcmVudC1ib2wgdHlw
ZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZzZXQpCmRpZmYgLS1naXQgYS90ZXN0L2xpc3AvcHJv
Z21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNvdXJjZXMvaW5kZW50LmVydHMgYi90ZXN0L2xp
c3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNvdXJjZXMvaW5kZW50LmVydHMKaW5k
ZXggYmVjOTZhZDgyZTAuLjkwOGRkODEwM2I1IDEwMDY0NAotLS0gYS90ZXN0L2xpc3AvcHJvZ21v
ZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNvdXJjZXMvaW5kZW50LmVydHMKKysrIGIvdGVzdC9s
aXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzCkBA
IC02Miw2ICs2MiwzNCBAQCBjb25zdCBmb28gPSAoeDogc3RyaW5nKSA9PiB7CiB9OwogPS09LT0K
IAorTmFtZTogTGV4aWNhbCBhbmQgdmFyaWFibGUgZGVjbGFyYXRpb25zCisKKz0tPQorY29uc3Qg
Zm9vID0gKCkgPT4geworICBsZXQgeCA9IDEsCisgICAgICB5eXl5OiB7CisgICAgICAgIFtrOiBz
dHJpbmcgfCBudW1iZXJdOiBzdHJpbmcsCisgICAgICB9ID0geworICAgICAgICAiZm9vIjogImZv
byIsCisgICAgICAgICJiYXIiOiAiYmFyIiwKKyAgICAgIH07CisgIHZhciBvYmFyID0gMSwKKyAg
ICAgIGZvOiB7IFt4OiBhbnldOiBhbnkgfSA9IHsKKyAgICAgICAgImEiOiAxLAorICAgICAgICAi
YiI6IDIsCisgICAgICB9OworICBjb25zdCBzb21lRnVuY1dpdGhSZWFsbHlMb25nTmFtZSA9Cisg
ICAgYXN5bmMgKHg6IG51bWJlciwgeTogbnVtYmVyLCB6OiBudW1iZXIpOiBQcm9taXNlPHZvaWQ+
ID0+IHsKKyAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgpOworICAgIH07CisgIGNvbnN0IGNjY2Mg
PSAxLAorICAgICAgICBiYmIgPSB7CisgICAgICAgICAgIngiOiAwCisgICAgICAgIH0sCisgICAg
ICAgIGRkZGRkID0gMDsKK307Cis9LT0tPQorCiBDb2RlOgogICAobGFtYmRhICgpCiAgICAgKHNl
dHEgaW5kZW50LXRhYnMtbW9kZSBuaWwpCi0tIAoyLjM0LjEKCg==
--0000000000005b0b060616ce8b96--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 24 Apr 2024 23:16:08 +0000
Resent-Message-ID: <handler.68054.B68054.17140005513195 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Noah Peart <noah.v.peart@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.17140005513195
          (code B ref 68054); Wed, 24 Apr 2024 23:16:08 +0000
Received: (at 68054) by debbugs.gnu.org; 24 Apr 2024 23:15:51 +0000
Received: from localhost ([127.0.0.1]:60226 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzlqA-0000pT-Hy
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 19:15:51 -0400
Received: from fout7-smtp.messagingengine.com ([103.168.172.150]:41421)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1rzlq3-0000my-Rw
 for 68054 <at> debbugs.gnu.org; Wed, 24 Apr 2024 19:15:48 -0400
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailfout.nyi.internal (Postfix) with ESMTP id 1184F13800C8;
 Wed, 24 Apr 2024 19:15:21 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute6.internal (MEProxy); Wed, 24 Apr 2024 19:15:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1714000521;
 x=1714086921; bh=ZS9TBSe8zScFtgzwvK7ZKQh2GKDBZP3P3UUz+lDGo+Q=; b=
 FlgFGNQftCQ13tNghFEhZQBLMy5w1l8wVycUXP9ckTAuQC1rv4OW6SC55J6qzBAH
 mzG1Ou83jyjMnRBWMnNOkhU5gUWvtwbQaWLNI/bVb5h2HWsNyLDgz5gwJ+TJix1g
 nA9dLC+83gMYLHuQGD5RAJjNyE1MB5ETkOIWTyADyMVY7gmihyJX90PjoViWfaWf
 05T7wiQchb6F3I5ZqACryUOp/4pd4kokazE5Svbh1TrNZcgarvcY79rmu50D1awF
 0pVD/hXPHpXVq7QGlxxfRg9VtLR4WiRBn8lpYo/cxl3okm9ixtdbQJzSNmoU7O8L
 e+FNr20fwqPzab44FStaUg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714000521; x=
 1714086921; bh=ZS9TBSe8zScFtgzwvK7ZKQh2GKDBZP3P3UUz+lDGo+Q=; b=T
 a+lW/m6AmWRj4SeiXW5VIizvI0xNnWNQsJzRe0vN7HZ8FJMCjFIEv2DyziivOJ7F
 RmVhC19eIhXfi3mPvIjxHOl6p3Ny+x3cofxc1m7pSSgIKy319RUgXIUUhNXHmd2P
 DHVVOWWE6EYidCAN9u6ARbWfEKAWcIYdY5D3/wvxeXTD588P+DT4jej/OpZ6GSzE
 eekP+I3qXJPx+Brk1vuA4c9XJVdzrLiCIzRbMhoHzzsn2sdLP+oZ8KlFBRSGGKzI
 ZGGqzGwKXZYK7sF6uLtOEYoXUQi78fNfNwTXK5xZ0LnQcZ76NjZ3itbwFbHIZHtM
 cmreijj80Xy8zImFfI+Ng==
X-ME-Sender: <xms:iJIpZrCukP9yXyGEy3KJ3rCMIIrO5pTmLwgP6uCELFe5uWR0qXsQrw>
 <xme:iJIpZhidwr-ughLRYZp1VLkAMzySlAtTppzqMyeMGq2HqYfJUFZ8__R1jjOC6SkWY
 EDUMQ7HBj97EIaptyE>
X-ME-Received: <xmr:iJIpZmnLgBhJsqtjPyBvR5kKpBT2cd1qjvIBy7M6dE7sNRNntVElKAGH-ihYI7S9s-cq>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeliedgvdduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveegtedthefhudekteehffeu
 keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:iJIpZtxdRv1dRP42VV2UUI9Sp_AqxYWm9vQtCrjomMZ854PPU02KWQ>
 <xmx:iJIpZgRjXZqpnP523vpyBxnuWRqVBYTBXS7UsuTWdQq_KID6vjFQ_g>
 <xmx:iJIpZgZdT-Gi5-LbzQjfQEIEv6ZUvBtibMpqhiMfi_BZxT6n5UHpzg>
 <xmx:iJIpZhSRg6TQDMXlHGj8toE4vrCYQdtbl09rxu4Q1loqNWsqXi53pQ>
 <xmx:iZIpZmcdiGf8sTeIyVzxhPvGpYyjMaJPJheLmnjY72a2oUqg5B5FhEPV>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 24 Apr 2024 19:15:19 -0400 (EDT)
Message-ID: <3cf27c4d-d5ee-423c-a0d2-cfae297d36ae@HIDDEN>
Date: Thu, 25 Apr 2024 02:15:16 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
 <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
 <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
 <CAPVBTSd+TcBx=Qvq0177syGnMKaRMtMd2sd1o83C=iNEWTUmkg@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CAPVBTSd+TcBx=Qvq0177syGnMKaRMtMd2sd1o83C=iNEWTUmkg@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 24/04/2024 05:36, Noah Peart wrote:
>  > What js-mode does (looks like 3) shouldn't be too bad, but I wouldn't
> mind an extra indentation level for such cases, too (example 2).
> 
> The problem I found with option 2/3 was cases like the following (which
> also seem like the most common) where I expect the start of
> the function be indented according to `typescript-ts-mode-indent-offset`,
> not with the declaration keyword "const" as in `js-mode` (and option 3).
> 
>      const someFuncWithReallyLongName =
>        async (x: number, y: number, z: number): Promise<void> => {
>          // ...
>        };

I don't know, in my understanding the line break after the "=" (or its 
absence) is usually a good enough look to choose between indentation 
offsets for a given statement. I.e. with the break after = it would be 
indented deeply, and without it (keeping "async" on the first line) the 
body would have the same base indentation as the "const" statement.

Though of course some users like it differently anyway.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Noah Peart <noah.v.peart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 25 Apr 2024 22:50:08 +0000
Resent-Message-ID: <handler.68054.B68054.171408537325169 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.171408537325169
          (code B ref 68054); Thu, 25 Apr 2024 22:50:08 +0000
Received: (at 68054) by debbugs.gnu.org; 25 Apr 2024 22:49:33 +0000
Received: from localhost ([127.0.0.1]:33458 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s07u8-0006Wa-I3
	for submit <at> debbugs.gnu.org; Thu, 25 Apr 2024 18:49:31 -0400
Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]:51347)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noah.v.peart@HIDDEN>) id 1s07ty-0006Tp-B9
 for 68054 <at> debbugs.gnu.org; Thu, 25 Apr 2024 18:49:20 -0400
Received: by mail-oa1-x2c.google.com with SMTP id
 586e51a60fabf-2351c03438cso648029fac.2
 for <68054 <at> debbugs.gnu.org>; Thu, 25 Apr 2024 15:48:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714085329; x=1714690129; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=Cbcap2Of2dGk93QKztO4Hf/0rBd96kXJE1D9lODFmzM=;
 b=X4QuY9ONV0NgHpvoHC3NqG2u7SCyxCI+HMSW2L1nTDhHN/pEjREsHkDsC1Qu83xwqB
 Zf/yhwU3waXxePfpx4T74sy9GLVL5CQdV2WbEFhbobSeZfcD8J2+jHV/BgMv/Vziz+3F
 5A4xZNV5ICPxsg3qXJC4rxfuaSMrPRa3PB2+zPNuKv/aUZtZyAQx0a1B24OkUiHFx9YL
 banxm6XIendBJSWqM2cVpXgY7awIa4PTOfl0wnmqJSle2BZLxbJmH7+Jub+INFg0yrjW
 utLkbeb/83vFzikIpRJnoysmajtrz2N8p8wTKbnSOxQTq6YVoj0Sp7XQ031Y1fbAilMP
 51vQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714085329; x=1714690129;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=Cbcap2Of2dGk93QKztO4Hf/0rBd96kXJE1D9lODFmzM=;
 b=YWaVt9S0PUiqFa5w3+AZjHl8z00/98lSqdKboYwSZCAwJSGN+KHGgYzC3BTZz8LmE/
 2R57dCBVWOPwPW8XFagEUOoR07IeQdHeg9rWvGdJ0eqNMzPc5w3DOH5+ikhf6G8fyfKd
 YgkHqySBE6FoRyeLLQK5m3/ZP2RGqwxu7k0Vu4YnluHdyM1Wq11k7tvNOAo7sq2RO4rO
 M/dxHx3Bb9IVgrJR+69Jnh0yd+2jQh5grq4raAR8lTcpKegETdw/cWpxX9g6sFx8S2hc
 WNp66RuCarD0vGtQPrR9D6D22t09Ubl+r5dH4AiS9KPNir3emLS5N91tdnQgd7/Ma4It
 a3Mg==
X-Forwarded-Encrypted: i=1;
 AJvYcCUKH0XuLkrcscpMZUc7+iUcI7JynjhezlXWtNSXTOdB/05OPrOEa0mjnr3UHwjdK5o1BuVkpobDfmaNgNzJPHxuVr3zaTQ=
X-Gm-Message-State: AOJu0YxXkeR4Ny771gdiUlNYPDpdnANOX2RCLHlxHVeuNz0O2CJgrWNf
 E8EKegIhkCeJ1lGH53l4fDKb0fIq/HqKz4zWG75QNcpcIAL/f5LAFFmN4AnjwlCwBRxIeii4paK
 Mboh6qT7PKQyEm+J+A7zZGCiwBAcdNaZ5FK0=
X-Google-Smtp-Source: AGHT+IE/8u4uXGnWn0rGEaj6nzFfUH/l9NzMfFHR6yiLb8D38zve1myM/w8z5/Ir5WSqU2qBDv/3i6M4aJdVdejom80=
X-Received: by 2002:a05:6870:d38d:b0:238:dcff:90c9 with SMTP id
 k13-20020a056870d38d00b00238dcff90c9mr961605oag.10.1714085328229; Thu, 25 Apr
 2024 15:48:48 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
 <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
 <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
 <CAPVBTSd+TcBx=Qvq0177syGnMKaRMtMd2sd1o83C=iNEWTUmkg@HIDDEN>
 <3cf27c4d-d5ee-423c-a0d2-cfae297d36ae@HIDDEN>
In-Reply-To: <3cf27c4d-d5ee-423c-a0d2-cfae297d36ae@HIDDEN>
From: Noah Peart <noah.v.peart@HIDDEN>
Date: Thu, 25 Apr 2024 15:48:37 -0700
Message-ID: <CAPVBTSdR5UqtJtmzREvEUAGh6+gKKEq_+WF0L1hxb_KuPDgRGw@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000001a9e610616f397d9"
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

--0000000000001a9e610616f397d9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Ok, I can make a patch for option 3 (the same as js-mode) instead. It's
implementation is the simplest also.  Would that work?

Thanks

On Wed, Apr 24, 2024 at 4:15=E2=80=AFPM Dmitry Gutov <dmitry@HIDDEN> wro=
te:

> On 24/04/2024 05:36, Noah Peart wrote:
> >  > What js-mode does (looks like 3) shouldn't be too bad, but I wouldn'=
t
> > mind an extra indentation level for such cases, too (example 2).
> >
> > The problem I found with option 2/3 was cases like the following (which
> > also seem like the most common) where I expect the start of
> > the function be indented according to `typescript-ts-mode-indent-offset=
`,
> > not with the declaration keyword "const" as in `js-mode` (and option 3)=
.
> >
> >      const someFuncWithReallyLongName =3D
> >        async (x: number, y: number, z: number): Promise<void> =3D> {
> >          // ...
> >        };
>
> I don't know, in my understanding the line break after the "=3D" (or its
> absence) is usually a good enough look to choose between indentation
> offsets for a given statement. I.e. with the break after =3D it would be
> indented deeply, and without it (keeping "async" on the first line) the
> body would have the same base indentation as the "const" statement.
>
> Though of course some users like it differently anyway.
>

--0000000000001a9e610616f397d9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Ok, I can make a patch for option 3 (the same as js-mode) =
instead. It&#39;s<div>implementation is the simplest also.=C2=A0 Would that=
 work?</div><div><div><br></div><div>Thanks=C2=A0</div></div></div><br><div=
 class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Apr 24=
, 2024 at 4:15=E2=80=AFPM Dmitry Gutov &lt;<a href=3D"mailto:dmitry@HIDDEN=
ev">dmitry@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex">On 24/04/2024 05:36, Noah Peart wrote:<br>
&gt;=C2=A0 &gt; What js-mode does (looks like 3) shouldn&#39;t be too bad, =
but I wouldn&#39;t<br>
&gt; mind an extra indentation level for such cases, too (example 2).<br>
&gt; <br>
&gt; The problem I found with option 2/3 was cases like the following (whic=
h<br>
&gt; also seem like the most common) where I expect the start of<br>
&gt; the function be indented according to `typescript-ts-mode-indent-offse=
t`,<br>
&gt; not with the declaration keyword &quot;const&quot; as in `js-mode` (an=
d option 3).<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 const someFuncWithReallyLongName =3D<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 async (x: number, y: number, z: number): Pr=
omise&lt;void&gt; =3D&gt; {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // ...<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 };<br>
<br>
I don&#39;t know, in my understanding the line break after the &quot;=3D&qu=
ot; (or its <br>
absence) is usually a good enough look to choose between indentation <br>
offsets for a given statement. I.e. with the break after =3D it would be <b=
r>
indented deeply, and without it (keeping &quot;async&quot; on the first lin=
e) the <br>
body would have the same base indentation as the &quot;const&quot; statemen=
t.<br>
<br>
Though of course some users like it differently anyway.<br>
</blockquote></div>

--0000000000001a9e610616f397d9--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 26 Apr 2024 01:07:06 +0000
Resent-Message-ID: <handler.68054.B68054.17140936024561 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Noah Peart <noah.v.peart@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.17140936024561
          (code B ref 68054); Fri, 26 Apr 2024 01:07:06 +0000
Received: (at 68054) by debbugs.gnu.org; 26 Apr 2024 01:06:42 +0000
Received: from localhost ([127.0.0.1]:33497 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0A2w-0001At-7V
	for submit <at> debbugs.gnu.org; Thu, 25 Apr 2024 21:06:40 -0400
Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:57353)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1s0A2q-00018Z-W1
 for 68054 <at> debbugs.gnu.org; Thu, 25 Apr 2024 21:06:35 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailfout.west.internal (Postfix) with ESMTP id 6BE0A1C000F1;
 Thu, 25 Apr 2024 21:06:08 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Thu, 25 Apr 2024 21:06:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1714093567;
 x=1714179967; bh=CRPRLT/JIRJXBqn2l3qdLdXSzGc16lWT7nIqS8GlDaE=; b=
 YoFz39+0Rd7uS5YZddJ7/L/q1FH3gErrcqddLzdogO4HUYGOIrnDfj5lrvhlAQ19
 2/eyQqWibFVw/xT0xklFKoOQtzOU5X40u/aFzq+NWYRgwyOigs5cHiAGLx0QspM9
 oMlLhmsLqo3bLr6ACHWZFFNZeROOecQjglGPqLqmJAtfZtGG/9rjZEzq+SdIsT/t
 xD3pE55Vv4URLOWWrIYyVILpg8h0RDqiWMcGT+OW4vBE08ljqahrVeaJB1nMF+M+
 SUbS79hTZNbsm6V7CauD9ue5eK1AkepnYA8iFhhMx8ka7pT8NhZT2V6X2+fJCBZf
 LI89IgTPIHJKu+yL7+dHVA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714093567; x=
 1714179967; bh=CRPRLT/JIRJXBqn2l3qdLdXSzGc16lWT7nIqS8GlDaE=; b=G
 WaUd0SwCtskHsrKs0wDXhqwZVeX2RpswyK5zGaNF/LOOnkAFq2PGiZgYNUWU8auG
 MycNupTu5RxWyF26VhU4paDsF8rkI7tsemUsLlDTX2mSMF6wM+N9Wx8aNeNlLJ3G
 GJJR/jd8VGqSzONGs5ZmXYfDIMoa/Xvgq6g3szgSAqq7r+MpkWXFTaA1vuC/KW9y
 NidQKbWgPzboKxABgoJHwm/aNHXXBnUlDuRrMWAIVyhoTU3gchtQXyHc+w8Rt5Z8
 qDOhn65xNKRi/aOBn51dZMfeqET5ilKhBuO+aDPGrKxQ7O+S/Qfw0zX8TLKPRRpI
 tUKytpXz6uIi4Pqu/r48w==
X-ME-Sender: <xms:__0qZns3OFXaq6nn6RWkwJYrOaORhcvDAu8c6DhhYf1-YQS5PASXhg>
 <xme:__0qZoc9IuLuCC7xHprsCq75m47hBpdrpxw9FxYUnvcR86FLQH7CXbqiQnUk6HRWB
 Xp_8PrDCG1v8tkuiS0>
X-ME-Received: <xmr:__0qZqzUr81tvOfarqmrbN292kIcRkEjrmvy84ODK0lcD5d1lVHUkOYla0t9OYJaNaM1>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelkedggeduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveegtedthefhudekteehffeu
 keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:__0qZmOBYwh7OBpujHgN6L8xYQXr96Ue5EhBnBpQtbd52IU6F7i9UQ>
 <xmx:__0qZn_NJFYUR55SffT7_Ya8ZXKdCJIQDtEcU8drWcbGB9PIpW7jvA>
 <xmx:__0qZmU1RtKvYqPApkwhILDgtKDi78chBk1eBiVWqnk-3W5jSTVeTg>
 <xmx:__0qZocLl903MqdHMla4OedsGqT19BSkHNkKE4X-9OgfdUSVN3397Q>
 <xmx:__0qZqYCeA7QKxNYgSSEstxjlVjvwEDJRADdxP4Yb7IuWybP12Ty9VXH>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 25 Apr 2024 21:06:06 -0400 (EDT)
Message-ID: <db3096de-803d-41ad-a86b-7c7eda3376b9@HIDDEN>
Date: Fri, 26 Apr 2024 04:06:05 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
 <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
 <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
 <CAPVBTSd+TcBx=Qvq0177syGnMKaRMtMd2sd1o83C=iNEWTUmkg@HIDDEN>
 <3cf27c4d-d5ee-423c-a0d2-cfae297d36ae@HIDDEN>
 <CAPVBTSdR5UqtJtmzREvEUAGh6+gKKEq_+WF0L1hxb_KuPDgRGw@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CAPVBTSdR5UqtJtmzREvEUAGh6+gKKEq_+WF0L1hxb_KuPDgRGw@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 26/04/2024 01:48, Noah Peart wrote:
> Ok, I can make a patch for option 3 (the same as js-mode) instead. It's
> implementation is the simplest also.  Would that work?

I'd be okay with it, yes, thank you. If only because it's good to have 
similar defaults in both modes, and evolve them together until one is 
deprecated.

FTR, the option more in line with my previous explanation would be 
option 3, I think. Rhere's no real need to implement it right now, I 
guess, but for illustration:

const a =
         (x: string): string => {
           return x + x;
         },
       bbb =
         {
           "x": 0
         },
       cccc =
         1,
       ddddd = 0;

const bbb =
       {
         "x": 0
       }, a = (x: string): string => {
         return x + x;
       },
       bbb = {
         "x": 0
       },
       cccc = 1,
       ddddd = 0;

js-mode also has by necessity the below exceptions: when the first 
variable's value starts on the same line, and it's multiline (usually 
that means that the same line ends with a {), then its indentation level 
goes back to the statement, not to the "const" keyword:

const a = (x: string): string => {
   return x + x;
}

var bbb = {
   "x": 0
}

This is basically to support the non-multivar declarations better. 
js-ts-mode now has the exact same indentation; these cases might come up 
when you change how the first two cases indent, however.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Noah Peart <noah.v.peart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 02 May 2024 13:27:01 +0000
Resent-Message-ID: <handler.68054.B68054.17146564061771 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.17146564061771
          (code B ref 68054); Thu, 02 May 2024 13:27:01 +0000
Received: (at 68054) by debbugs.gnu.org; 2 May 2024 13:26:46 +0000
Received: from localhost ([127.0.0.1]:43790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2WST-0000SV-7q
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 09:26:46 -0400
Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]:59598)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noah.v.peart@HIDDEN>) id 1s2WSO-0000SI-7y
 for 68054 <at> debbugs.gnu.org; Thu, 02 May 2024 09:26:43 -0400
Received: by mail-oa1-x2f.google.com with SMTP id
 586e51a60fabf-23d4a716ee7so1342954fac.2
 for <68054 <at> debbugs.gnu.org>; Thu, 02 May 2024 06:26:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714656372; x=1715261172; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=FJjoe4KYRUHZdIUokplWhYVa4229FKnF2E90oHuf3Lg=;
 b=MUeu4qxjRWajF5+LqL/fzvEaKTeb6e+dWrvoHR3R0tBZuOBm4R3pH1G1IKDa9xmtRL
 mVG9ROPDseiRy6mCApvXivgsdRZ7qkraLH0bEKcs5swUkvqVJ2YKnyBNg89vJfV38M6S
 V33MrL4Je8Iyc0q0p+0vUb5ICT/N42O5hUzIKArmMzPH/L4/HvnVArVR4fxR2JyG7lNI
 taHqb94IBxI+YswUMW2RldsKk5/4aXzT7idcu3ZkiYZT+rr6Dmf2/MEAa+gDwcqc4ODl
 CSBEcha3QlHbAGiOd2INsdDARlRo26v8BZeZv84BBWaox7L6SZRJyiXMXHC4tuRvbwIw
 MR9g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714656372; x=1715261172;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=FJjoe4KYRUHZdIUokplWhYVa4229FKnF2E90oHuf3Lg=;
 b=W8e9NAIbtg+YSy6xMi0LMY51lZMirvaaMYGJsHDjr/S/Vx3zxtOerAFC+uroi8tp+b
 qGaYO/BUNVpfgml45Pofg61ZzEEz30GZrkrwxcbrbniViABrSneG60bFEmR5Q1Llw8gq
 QoqsHPIBb0ecblyWe/nMU5jcwW4Kptko4PZoyO2rhzf+P2tst7Gs2VJZArKiItY4UCz3
 tM0/LGHrz8CaK/7d6y0W0IT3uyy6GGBmNVCMjFBx+PHT8DPFfzXO4wWPPi2Q65owmTGQ
 uYU1Sk+i5YdaRrbVafQEpcTghDIidK6JHQJeTQrHVu1b5le4R6QxeYffkdSyzc02S2Me
 1THw==
X-Forwarded-Encrypted: i=1;
 AJvYcCXxHJK14D7W3OahD//PDs4CfuajiTXxOclkLi9xbBohkGJOIyAxgiy83lnyzQJrQxgRqIhopobsOsgDQAnXZ0+BzeX7i1c=
X-Gm-Message-State: AOJu0Yz2G2UuFw12t3X4DMFF7Zae5Zk8d94ZceeQJHsS4LA4EvTQxGxj
 z1MBYa0jHe4ijnQpsQfKPOaNryzhQMGlTpdGGITvmoCYNaioai6pXdl1jpxzUGu1Aw/OrCQqC3I
 iwszzVnk/AlLoRC4JKnvs0Nc71j4=
X-Google-Smtp-Source: AGHT+IG9ktUtZQYgsSagjC4UtNvOjsXqU2KupFkar1N7zcLTm26/vZuXZakLxOCIM5CNahGFR5ch+r6DlC8i2mANcus=
X-Received: by 2002:a05:6870:f684:b0:221:9157:b587 with SMTP id
 el4-20020a056870f68400b002219157b587mr2716469oab.35.1714656371667; Thu, 02
 May 2024 06:26:11 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
 <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
 <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
 <CAPVBTSd+TcBx=Qvq0177syGnMKaRMtMd2sd1o83C=iNEWTUmkg@HIDDEN>
 <3cf27c4d-d5ee-423c-a0d2-cfae297d36ae@HIDDEN>
 <CAPVBTSdR5UqtJtmzREvEUAGh6+gKKEq_+WF0L1hxb_KuPDgRGw@HIDDEN>
 <db3096de-803d-41ad-a86b-7c7eda3376b9@HIDDEN>
In-Reply-To: <db3096de-803d-41ad-a86b-7c7eda3376b9@HIDDEN>
From: Noah Peart <noah.v.peart@HIDDEN>
Date: Thu, 2 May 2024 06:26:00 -0700
Message-ID: <CAPVBTScNQabge9RM9+RLFr6UmUsuh0pQpt7HL46W+i4MVFi+yg@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000f2412a0617788bd3"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000f2412a0617788bd3
Content-Type: multipart/alternative; boundary="000000000000f241290617788bd1"

--000000000000f241290617788bd1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Ok, here is an updated patch for option 3.  The indentation looks like the
examples
you've provided - it's the same indentation as in js-mode for these cases.


On Thu, Apr 25, 2024 at 6:06=E2=80=AFPM Dmitry Gutov <dmitry@HIDDEN> wro=
te:

> On 26/04/2024 01:48, Noah Peart wrote:
> > Ok, I can make a patch for option 3 (the same as js-mode) instead. It's
> > implementation is the simplest also.  Would that work?
>
> I'd be okay with it, yes, thank you. If only because it's good to have
> similar defaults in both modes, and evolve them together until one is
> deprecated.
>
> FTR, the option more in line with my previous explanation would be
> option 3, I think. Rhere's no real need to implement it right now, I
> guess, but for illustration:
>
> const a =3D
>          (x: string): string =3D> {
>            return x + x;
>          },
>        bbb =3D
>          {
>            "x": 0
>          },
>        cccc =3D
>          1,
>        ddddd =3D 0;
>
> const bbb =3D
>        {
>          "x": 0
>        }, a =3D (x: string): string =3D> {
>          return x + x;
>        },
>        bbb =3D {
>          "x": 0
>        },
>        cccc =3D 1,
>        ddddd =3D 0;
>
> js-mode also has by necessity the below exceptions: when the first
> variable's value starts on the same line, and it's multiline (usually
> that means that the same line ends with a {), then its indentation level
> goes back to the statement, not to the "const" keyword:
>
> const a =3D (x: string): string =3D> {
>    return x + x;
> }
>
> var bbb =3D {
>    "x": 0
> }
>
> This is basically to support the non-multivar declarations better.
> js-ts-mode now has the exact same indentation; these cases might come up
> when you change how the first two cases indent, however.
>

--000000000000f241290617788bd1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Ok, here is an updated patch for option 3.=C2=A0 The inden=
tation looks like the examples<br><div>you&#39;ve provided - it&#39;s the s=
ame indentation as in js-mode for these cases.</div><div><br></div></div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, =
Apr 25, 2024 at 6:06=E2=80=AFPM Dmitry Gutov &lt;<a href=3D"mailto:dmitry@g=
utov.dev">dmitry@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">On 26/04/2024 01:48, Noah Peart wrote:<br>
&gt; Ok, I can make a patch for option 3 (the same as js-mode) instead. It&=
#39;s<br>
&gt; implementation is the simplest also.=C2=A0 Would that work?<br>
<br>
I&#39;d be okay with it, yes, thank you. If only because it&#39;s good to h=
ave <br>
similar defaults in both modes, and evolve them together until one is <br>
deprecated.<br>
<br>
FTR, the option more in line with my previous explanation would be <br>
option 3, I think. Rhere&#39;s no real need to implement it right now, I <b=
r>
guess, but for illustration:<br>
<br>
const a =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(x: string): string =3D&gt; {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return x + x;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0bbb =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;x&quot;: 0<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0cccc =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0ddddd =3D 0;<br>
<br>
const bbb =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;x&quot;: 0<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0}, a =3D (x: string): string =3D&gt; {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return x + x;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0bbb =3D {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;x&quot;: 0<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0cccc =3D 1,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0ddddd =3D 0;<br>
<br>
js-mode also has by necessity the below exceptions: when the first <br>
variable&#39;s value starts on the same line, and it&#39;s multiline (usual=
ly <br>
that means that the same line ends with a {), then its indentation level <b=
r>
goes back to the statement, not to the &quot;const&quot; keyword:<br>
<br>
const a =3D (x: string): string =3D&gt; {<br>
=C2=A0 =C2=A0return x + x;<br>
}<br>
<br>
var bbb =3D {<br>
=C2=A0 =C2=A0&quot;x&quot;: 0<br>
}<br>
<br>
This is basically to support the non-multivar declarations better. <br>
js-ts-mode now has the exact same indentation; these cases might come up <b=
r>
when you change how the first two cases indent, however.<br>
</blockquote></div>

--000000000000f241290617788bd1--

--000000000000f2412a0617788bd3
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Add-typescript-ts-mode-indentation-for-multi-assignm.patch"
Content-Disposition: attachment; 
	filename="0001-Add-typescript-ts-mode-indentation-for-multi-assignm.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_lvpa2qzp0>
X-Attachment-Id: f_lvpa2qzp0

RnJvbSAxZTIzYjMzYTNiNGI5MzAzODZhOTMyZWU2MTc3ZWFmMWI2ZTZhOTZlIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBOb2FoIFBlYXJ0IDxub2FoLnYucGVhcnRAZ21haWwuY29tPgpE
YXRlOiBGcmksIDE5IEFwciAyMDI0IDAxOjQ2OjUwIC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gQWRk
IHR5cGVzY3JpcHQtdHMtbW9kZSBpbmRlbnRhdGlvbiBmb3IgbXVsdGktYXNzaWdubWVudCBkZWNs
cwoKKiBsaXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUuZWwKKHR5cGVzY3JpcHQtdHMt
bW9kZS0taW5kZW50LXJ1bGVzKTogQWRkIGluZGVudGF0aW9uIHJ1bGVzIGZvcgpsZXhpY2FsIGFu
ZCB2YXJpYWJsZSBkZWNsYXJhdGlvbnMgd2l0aCBtdWx0aXBsZSBhc3NpZ25tZW50cy4KKiB0ZXN0
L2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNvdXJjZXMvaW5kZW50LmVydHM6
CkFkZCBpbmRlbnQgdGVzdCBmb3IgdmFyaWFibGUgZGVjbGFyYXRpb25zLgotLS0KIGxpc3AvcHJv
Z21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbCAgICAgICAgICB8IDE0ICsrKysrKysrLQogLi4u
L3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNvdXJjZXMvaW5kZW50LmVydHMgIHwgMzEgKysrKysrKysr
KysrKysrKysrKwogMiBmaWxlcyBjaGFuZ2VkLCA0NCBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9u
KC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10cy1tb2RlLmVsIGIv
bGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10cy1tb2RlLmVsCmluZGV4IGFiMWQ3NmFiMjBlLi5l
ZDYwODE5Mzg4ZiAxMDA2NDQKLS0tIGEvbGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10cy1tb2Rl
LmVsCisrKyBiL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbApAQCAtOTEsNiAr
OTEsMTcgQEAgdHN4LXRzLW1vZGUtLWluZGVudC1jb21wYXRpYmlsaXR5LWI4OTM0MjYKICAgICAg
YCgoKG1hdGNoICI8IiAianN4X3RleHQiKSBwYXJlbnQgMCkKICAgICAgICAoKHBhcmVudC1pcyAi
anN4X3RleHQiKSBwYXJlbnQgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZzZXQpKSkpKQog
CisoZGVmdW4gdHlwZXNjcmlwdC10cy1tb2RlLS1hbmNob3ItZGVjbCAoX24gcGFyZW50ICZyZXN0
IF8pCisgICJSZXR1cm4gdGhlIHBvc2l0aW9uIGFmdGVyIHRoZSBkZWNsYXJhdGlvbiBrZXl3b3Jk
IGJlZm9yZSBQQVJFTlQuCisKK1RoaXMgYW5jaG9yIGFsbG93cyBhbGlnbmluZyB2YXJpYWJsZV9k
ZWNsYXJhdG9ycyBpbiB2YXJpYWJsZSBhbmQgbGV4aWNhbAorZGVjbGFyYXRpb25zLCBhY2NvdW50
aW5nIGZvciB0aGUgbGVuZ3RoIG9mIGtleXdvcmQgKHZhciwgbGV0LCBvciBjb25zdCkuIgorICAo
bGV0KiAoKGRlY2xhcmF0aW9uICh0cmVlc2l0LXBhcmVudC11bnRpbAorICAgICAgICAgICAgICAg
ICAgICAgICBwYXJlbnQgKHJ4IChvciAidmFyaWFibGUiICJsZXhpY2FsIikgIl9kZWNsYXJhdGlv
biIpIHQpKQorICAgICAgICAgKGRlY2wgKHRyZWVzaXQtbm9kZS1jaGlsZCBkZWNsYXJhdGlvbiAw
KSkpCisgICAgKCsgKHRyZWVzaXQtbm9kZS1zdGFydCBkZWNsYXJhdGlvbikKKyAgICAgICAoLSAo
dHJlZXNpdC1ub2RlLWVuZCBkZWNsKSAodHJlZXNpdC1ub2RlLXN0YXJ0IGRlY2wpKSkpKQorCiAo
ZGVmdW4gdHlwZXNjcmlwdC10cy1tb2RlLS1pbmRlbnQtcnVsZXMgKGxhbmd1YWdlKQogICAiUnVs
ZXMgdXNlZCBmb3IgaW5kZW50YXRpb24uCiBBcmd1bWVudCBMQU5HVUFHRSBpcyBlaXRoZXIgYHR5
cGVzY3JpcHQnIG9yIGB0c3gnLiIKQEAgLTExMyw3ICsxMjQsOCBAQCB0eXBlc2NyaXB0LXRzLW1v
ZGUtLWluZGVudC1ydWxlcwogICAgICAoKHBhcmVudC1pcyAic3dpdGNoX2Nhc2UiKSBwYXJlbnQt
Ym9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAi
c3dpdGNoX2RlZmF1bHQiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zm
c2V0KQogICAgICAoKHBhcmVudC1pcyAidHlwZV9hcmd1bWVudHMiKSBwYXJlbnQtYm9sIHR5cGVz
Y3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQotICAgICAoKHBhcmVudC1pcyAidmFyaWFibGVf
ZGVjbGFyYXRvciIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZzZXQp
CisgICAgICgocGFyZW50LWlzICwocnggKG9yICJ2YXJpYWJsZSIgImxleGljYWwiKSAiXyIgKG9y
ICJkZWNsYXJhdGlvbiIgImRlY2xhcmF0b3IiKSkpCisgICAgICB0eXBlc2NyaXB0LXRzLW1vZGUt
LWFuY2hvci1kZWNsIDEpCiAgICAgICgocGFyZW50LWlzICJhcmd1bWVudHMiKSBwYXJlbnQtYm9s
IHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAiYXJy
YXkiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAo
KHBhcmVudC1pcyAiZm9ybWFsX3BhcmFtZXRlcnMiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMt
bW9kZS1pbmRlbnQtb2Zmc2V0KQpkaWZmIC0tZ2l0IGEvdGVzdC9saXNwL3Byb2dtb2Rlcy90eXBl
c2NyaXB0LXRzLW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzIGIvdGVzdC9saXNwL3Byb2dtb2Rl
cy90eXBlc2NyaXB0LXRzLW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzCmluZGV4IGJlYzk2YWQ4
MmUwLi44NzczODI5NTNjMSAxMDA2NDQKLS0tIGEvdGVzdC9saXNwL3Byb2dtb2Rlcy90eXBlc2Ny
aXB0LXRzLW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzCisrKyBiL3Rlc3QvbGlzcC9wcm9nbW9k
ZXMvdHlwZXNjcmlwdC10cy1tb2RlLXJlc291cmNlcy9pbmRlbnQuZXJ0cwpAQCAtNjIsNiArNjIs
MzcgQEAgY29uc3QgZm9vID0gKHg6IHN0cmluZykgPT4gewogfTsKID0tPS09CiAKK05hbWU6IExl
eGljYWwgYW5kIHZhcmlhYmxlIGRlY2xhcmF0aW9ucworCis9LT0KK2NvbnN0IGZvbyA9ICgpID0+
IHsKKyAgbGV0IHggPSAxLAorICAgICAgeXl5eTogeworICAgICAgICBbazogc3RyaW5nIHwgbnVt
YmVyXTogc3RyaW5nLAorICAgICAgfSA9IHsKKyAgICAgICAgImZvbyI6ICJmb28iLAorICAgICAg
ICAiYmFyIjogImJhciIsCisgICAgICB9OworICB2YXIgb2JhciA9IDEsCisgICAgICBmbzogeyBb
eDogYW55XTogYW55IH0gPSB7CisgICAgICAgICJhIjogMSwKKyAgICAgICAgImIiOiAyLAorICAg
ICAgfTsKKyAgY29uc3QgY2NjYyA9IDEsCisgICAgICAgIGJiYiA9IHsKKyAgICAgICAgICAieCI6
IDAKKyAgICAgICAgfSwKKyAgICAgICAgZGRkZGQgPSAwOworICAvLyBGaXJzdCBkZWNscyB3aXRo
IHZhbHVlIHN0YXJ0aW5nIG9uIHNhbWUgbGluZQorICBjb25zdCBhID0gKHg6IHN0cmluZyk6IHN0
cmluZyA9PiB7CisgICAgcmV0dXJuIHggKyB4OworICB9OworICB2YXIgYmJiID0geworICAgICJ4
IjogMAorICB9OworfTsKKz0tPS09CisKIENvZGU6CiAgIChsYW1iZGEgKCkKICAgICAoc2V0cSBp
bmRlbnQtdGFicy1tb2RlIG5pbCkKLS0gCjIuMzQuMQoK
--000000000000f2412a0617788bd3--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#68054: [PATCH] Add tree-sitter indent rule for lexical decls in js/typescript
Resent-From: Noah Peart <noah.v.peart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 02 May 2024 13:40:02 +0000
Resent-Message-ID: <handler.68054.B68054.171465718312880 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 68054
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: Yuan Fu <casouri@HIDDEN>, 68054 <at> debbugs.gnu.org
Received: via spool by 68054-submit <at> debbugs.gnu.org id=B68054.171465718312880
          (code B ref 68054); Thu, 02 May 2024 13:40:02 +0000
Received: (at 68054) by debbugs.gnu.org; 2 May 2024 13:39:43 +0000
Received: from localhost ([127.0.0.1]:43879 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2Wez-0003Lg-1s
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 09:39:42 -0400
Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]:57424)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noah.v.peart@HIDDEN>) id 1s2Wev-0003La-OR
 for 68054 <at> debbugs.gnu.org; Thu, 02 May 2024 09:39:39 -0400
Received: by mail-oa1-x30.google.com with SMTP id
 586e51a60fabf-23d2462c3b3so1259261fac.2
 for <68054 <at> debbugs.gnu.org>; Thu, 02 May 2024 06:39:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714657150; x=1715261950; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=ORy0nLHztgegQsn1kZ5q85yDVH79ceZkj0NZO7OP60Y=;
 b=m31M5A2I4xgOC0RH56RHQl/domZYgCqx2ojEkQSrpQrH5wbA3hK4BstSGDs2YoCPrW
 ALCllKekKjCYN3+WgdX8nzZbjdZ8uKUYo9Xj7cZUPicP0CKSwSROySy6JcKH6cXQ04y5
 b34jvkZL7CtqTkkMeoDxdYZKcMDGuyeX1gbuAUxJDftN4xEurtSy8nrUQ8450RbLjqFZ
 MKlbyI6qR4fVKL0qNyPn6e0678Ma+52CYTldm1MZwSlfJBrx3sJx4LgLXMIoElPc+Wsl
 UqPJAr+Wbrx3VhPc9GKJCtYd+KwTBrje1QeYNDYnPcCjrncDaLSdH77f6XPVa2d9QwFI
 34zQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714657150; x=1715261950;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=ORy0nLHztgegQsn1kZ5q85yDVH79ceZkj0NZO7OP60Y=;
 b=M2lo69Z6hcGB8BSbDIiyPtPyAa0LcKhh1+oVlSzoeSUKBF75270pXWRteW2Stv0riB
 ynlirj4lZ3i3DbV91bEqY+XAw732ZUItX6m5rZHWlIXBNQx6nHUGEZt0Zelh9+KJ8eR9
 KSLIuRctot1IarsJNnk4wi04k2EoVNKeAjr9VFskvPSdTeoEUuQUZHqVMo5wq/D68AAx
 kux75ijjCl6VcamE3Y9pKC3JqiVrE0G6A5noam+q/ifWl/qFjIRxOFBgmYvXgN5F9zia
 P3KkqBKPdDEznJuQ/jAvoqU46oYwGDACHcHAhBj7c0AZissU+GY7tx7R4CGCmNOnz4rG
 srpg==
X-Forwarded-Encrypted: i=1;
 AJvYcCUwkXDdAdWx3D+IEeZhkWkM8sqQM8kLrtME+rGJnVu4zjRTf8c2Twvj6jLtE/Dx0iqOxt3VFq8X3p0seGCgNsUTXiuryZs=
X-Gm-Message-State: AOJu0YxlKHphRj64KSaqgDZZDezN62Ar/AxVjzxmAjtQotsVpmPu5jgh
 hTd5Ws0sYrBSUb4gNIKYLvvaCOj215E/3qWpok/T0gWBTsSBJRXaWTmlYVdFehPFGCEJ5DcueWH
 2YhSi9t7ZDoTi99lvwG1BygVWAYY=
X-Google-Smtp-Source: AGHT+IHWb17VPxOfqKcWVidWdpYnrjmvQLyBUNDZA15SP0papt5B2IOWwefb7PUT8zXdGVfJbPRvwibGe2HPV8S+dZw=
X-Received: by 2002:a05:6871:713:b0:22e:c17e:4aa1 with SMTP id
 f19-20020a056871071300b0022ec17e4aa1mr2301518oap.20.1714657149281; Thu, 02
 May 2024 06:39:09 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVBTSf1Vp8dDtsgDqYP_-jr0a6CYK+1iC-Rmg8_Th+gY0NsCw@HIDDEN>
 <797AC075-B0C8-4269-B8E3-A1F2C69FA955@HIDDEN>
 <14DD6D3A-B9F5-4E5F-B85B-0A8DF6961723@HIDDEN>
 <5fd5b131-962a-489d-a674-0e199cdfff25@HIDDEN>
 <CAPVBTScKwa-wsDpsWkcxO8z6UH3B2DZwRDCFWWph1q_2f6CtTA@HIDDEN>
 <c99e0937-7779-4c7a-aecd-db517b058188@HIDDEN>
 <D3C4EDA7-93A3-4698-8A1E-737BD98879AE@HIDDEN>
 <CAPVBTSeLOYuEH6je5AJcXU0cxj5Qjx-FNZdo9Zt5UAngaWbtFQ@HIDDEN>
 <49231C5D-E89E-4AA3-AB02-51340994EA20@HIDDEN>
 <661fc11d-6da8-4fe5-a900-80ed1b41823a@HIDDEN>
 <CAPVBTSd+TcBx=Qvq0177syGnMKaRMtMd2sd1o83C=iNEWTUmkg@HIDDEN>
 <3cf27c4d-d5ee-423c-a0d2-cfae297d36ae@HIDDEN>
 <CAPVBTSdR5UqtJtmzREvEUAGh6+gKKEq_+WF0L1hxb_KuPDgRGw@HIDDEN>
 <db3096de-803d-41ad-a86b-7c7eda3376b9@HIDDEN>
 <CAPVBTScNQabge9RM9+RLFr6UmUsuh0pQpt7HL46W+i4MVFi+yg@HIDDEN>
In-Reply-To: <CAPVBTScNQabge9RM9+RLFr6UmUsuh0pQpt7HL46W+i4MVFi+yg@HIDDEN>
From: Noah Peart <noah.v.peart@HIDDEN>
Date: Thu, 2 May 2024 06:38:57 -0700
Message-ID: <CAPVBTScPO4vCMZ9qkJZEw9o54XB7_QM0kygiU2e0DD_DYYtKNg@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000004b6da2061778baa7"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000004b6da2061778baa7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> js-ts-mode now has the exact same indentation

I'm not sure what you meant by this - did you mean js-ts-mode has
the same indentation for non-multivar declarations as the examples
shown above? js-ts-mode is still missing indentation rules for multiple
decl statements.
The patch would work for js-ts-mode as well, but I didn't want to copy the
code between the files.

So much of the grammar is shared between js-ts-mode and
typescript-ts-mode, it might be worth combining - neovim uses an ecma
grammar
from which they both inherit.

On Thu, May 2, 2024 at 6:26=E2=80=AFAM Noah Peart <noah.v.peart@HIDDEN> =
wrote:

> Ok, here is an updated patch for option 3.  The indentation looks like th=
e
> examples
> you've provided - it's the same indentation as in js-mode for these cases=
.
>
>
> On Thu, Apr 25, 2024 at 6:06=E2=80=AFPM Dmitry Gutov <dmitry@HIDDEN> w=
rote:
>
>> On 26/04/2024 01:48, Noah Peart wrote:
>> > Ok, I can make a patch for option 3 (the same as js-mode) instead. It'=
s
>> > implementation is the simplest also.  Would that work?
>>
>> I'd be okay with it, yes, thank you. If only because it's good to have
>> similar defaults in both modes, and evolve them together until one is
>> deprecated.
>>
>> FTR, the option more in line with my previous explanation would be
>> option 3, I think. Rhere's no real need to implement it right now, I
>> guess, but for illustration:
>>
>> const a =3D
>>          (x: string): string =3D> {
>>            return x + x;
>>          },
>>        bbb =3D
>>          {
>>            "x": 0
>>          },
>>        cccc =3D
>>          1,
>>        ddddd =3D 0;
>>
>> const bbb =3D
>>        {
>>          "x": 0
>>        }, a =3D (x: string): string =3D> {
>>          return x + x;
>>        },
>>        bbb =3D {
>>          "x": 0
>>        },
>>        cccc =3D 1,
>>        ddddd =3D 0;
>>
>> js-mode also has by necessity the below exceptions: when the first
>> variable's value starts on the same line, and it's multiline (usually
>> that means that the same line ends with a {), then its indentation level
>> goes back to the statement, not to the "const" keyword:
>>
>> const a =3D (x: string): string =3D> {
>>    return x + x;
>> }
>>
>> var bbb =3D {
>>    "x": 0
>> }
>>
>> This is basically to support the non-multivar declarations better.
>> js-ts-mode now has the exact same indentation; these cases might come up
>> when you change how the first two cases indent, however.
>>
>

--0000000000004b6da2061778baa7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; js-ts-mode now has the exact same indentation<div><br=
></div><div>I&#39;m not sure what you meant by this - did you mean js-ts-mo=
de has</div><div>the same indentation for non-multivar declarations as the =
examples</div><div>shown above? js-ts-mode is still missing indentation rul=
es for multiple decl statements.</div><div>The patch would work for js-ts-m=
ode as well, but I didn&#39;t want to copy the</div><div>code between the f=
iles.=C2=A0</div><div><br></div><div>So much of the grammar is shared betwe=
en js-ts-mode and</div><div>typescript-ts-mode, it might be worth combining=
 - neovim uses an ecma grammar</div><div>from which they both inherit.</div=
></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr"=
>On Thu, May 2, 2024 at 6:26=E2=80=AFAM Noah Peart &lt;<a href=3D"mailto:no=
ah.v.peart@HIDDEN">noah.v.peart@HIDDEN</a>&gt; wrote:<br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Ok, here is an=
 updated patch for option 3.=C2=A0 The indentation looks like the examples<=
br><div>you&#39;ve provided - it&#39;s the same indentation as in js-mode f=
or these cases.</div><div><br></div></div><br><div class=3D"gmail_quote"><d=
iv dir=3D"ltr" class=3D"gmail_attr">On Thu, Apr 25, 2024 at 6:06=E2=80=AFPM=
 Dmitry Gutov &lt;<a href=3D"mailto:dmitry@HIDDEN" target=3D"_blank">dmi=
try@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddi=
ng-left:1ex">On 26/04/2024 01:48, Noah Peart wrote:<br>
&gt; Ok, I can make a patch for option 3 (the same as js-mode) instead. It&=
#39;s<br>
&gt; implementation is the simplest also.=C2=A0 Would that work?<br>
<br>
I&#39;d be okay with it, yes, thank you. If only because it&#39;s good to h=
ave <br>
similar defaults in both modes, and evolve them together until one is <br>
deprecated.<br>
<br>
FTR, the option more in line with my previous explanation would be <br>
option 3, I think. Rhere&#39;s no real need to implement it right now, I <b=
r>
guess, but for illustration:<br>
<br>
const a =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(x: string): string =3D&gt; {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return x + x;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0bbb =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;x&quot;: 0<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0cccc =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0ddddd =3D 0;<br>
<br>
const bbb =3D<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;x&quot;: 0<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0}, a =3D (x: string): string =3D&gt; {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return x + x;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0bbb =3D {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;x&quot;: 0<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0},<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0cccc =3D 1,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0ddddd =3D 0;<br>
<br>
js-mode also has by necessity the below exceptions: when the first <br>
variable&#39;s value starts on the same line, and it&#39;s multiline (usual=
ly <br>
that means that the same line ends with a {), then its indentation level <b=
r>
goes back to the statement, not to the &quot;const&quot; keyword:<br>
<br>
const a =3D (x: string): string =3D&gt; {<br>
=C2=A0 =C2=A0return x + x;<br>
}<br>
<br>
var bbb =3D {<br>
=C2=A0 =C2=A0&quot;x&quot;: 0<br>
}<br>
<br>
This is basically to support the non-multivar declarations better. <br>
js-ts-mode now has the exact same indentation; these cases might come up <b=
r>
when you change how the first two cases indent, however.<br>
</blockquote></div>
</blockquote></div>

--0000000000004b6da2061778baa7--





Last modified: Thu, 2 May 2024 13:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.