From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#74386: Tree-sitter javascript indentation Date: Sun, 17 Nov 2024 21:18:45 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17577"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Marius Kjeldahl , 74386@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 17 20:19:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tCkno-0004RM-Fv for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Nov 2024 20:19:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCknY-0002MN-BM; Sun, 17 Nov 2024 14:19:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tCknW-0002Lt-7y for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 14:19:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCknV-0005Vs-Si for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 14:19:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=Q9t5uuQFphikoxdyF1feLrCsSUobcDbPfoKbFX1YNIA=; b=DBOM++bNzOGELKkmJm6+3xjwECFFDzJiwTk/KVuGs/gPZM4+nGVXCH5FUpaWNPJt1ye940GzlCRxJrUG3hxpU7+QyIpDXYmsbo0kurpoCBIvK9HOWfDBfZy9I3zDqbA//xKBQhbNqyNFSRxP2a9wJDuq9k5Dv8otoUSuFh2SWqVAdjgtu2mzzoG38h1U9WiKI39nIfQXJjPOTIgVfJp0IjW0v7S3N2vcd9Xcim2YsPlELFbymNYyEO7qyK4ekTqN1atE6ieuAvvpoO94Pfbty8d0fFw2LbjvVZ1J4SdZ+ttglXYZkmLzClCQ/GBMLyTPkJCCblEL0blqOtzaTJWKsw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCknV-0001jE-NN for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 14:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Nov 2024 19:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74386 X-GNU-PR-Package: emacs Original-Received: via spool by 74386-submit@debbugs.gnu.org id=B74386.17318711376634 (code B ref 74386); Sun, 17 Nov 2024 19:19:01 +0000 Original-Received: (at 74386) by debbugs.gnu.org; 17 Nov 2024 19:18:57 +0000 Original-Received: from localhost ([127.0.0.1]:58655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCknR-0001iw-53 for submit@debbugs.gnu.org; Sun, 17 Nov 2024 14:18:57 -0500 Original-Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]:38493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCknO-0001if-A3 for 74386@debbugs.gnu.org; Sun, 17 Nov 2024 14:18:55 -0500 Original-Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id CE9C41380439; Sun, 17 Nov 2024 14:18:48 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sun, 17 Nov 2024 14:18:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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=1731871128; x=1731957528; bh=Q9t5uuQFphikoxdyF1feLrCsSUobcDbPfoKbFX1YNIA=; b= damZLopVEY/sN4RtMosyes8ool41NU7zkbpPd+zVuDWYetmj9prkLxMvso3JrV+r /PrbNHojrWh9VjpsVJQIV5WE7xfTWfU6EufEUfgZHLNhZ8TJ64Q6pEHGX6FK87JG ro3Hk6qN3kTzMwdb0RT4P+sHgXT2C16iOKvynxt82YYb/iLcPg3YGwJJs0ggMq1J FmkEd+6UEV/DUbVwTDaz74vkCkLKQQQjSRYvJ0baku9vyYOt5fbr0GziUXuwYdPM tXxsqKW7EOM9dbCaEzBDp7SH0WB670ASjpbhuHGUxV1dHb7cDUgF3hrW9X665Kzz Ih5gg+QkZiaGzekqFrQYog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-sender :x-me-sender:x-sasl-enc; s=fm3; t=1731871128; x=1731957528; bh=Q 9t5uuQFphikoxdyF1feLrCsSUobcDbPfoKbFX1YNIA=; b=CPpN+R9CpfUXAOHR+ 2hWyHnn+aICHKvDAgzTGkG+vzkjX6Zh8tODOUhqu8Tl5BHMzRCwccURXSQ1y4Yse QM1B5/Ik2FIdikjjH5kpOFPaM1LaZLoLXdk/CYcCZRUR/mjMa75zYQgixhkhwNj1 gJnKieGK4imgg/XkeAA+sI+afK0bCVrbw50xpsMt+kcUo4/C8C6sh173L0n3dKe1 DDVEwtjL5LShJJ1owezyJFP5CmqoUqUwzouXr/u35SBpmVJi+uc0bzTuHPj/VXkP s1xex5ln1EBUgL+TkiNbdc/qHiWyfBbZI3SG3C9xgkEFc6WU6WNIjKxZsT2MB6iN ZH6NA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvdekgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpedthfeuvddtveelgeeuleevvdejveehffevveehvdeu ffdtfefhvdeugefgtefgtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhgrrhhiuhhsrdhkjhgvlhgurg hhlhesghhmrghilhdrtghomhdprhgtphhtthhopeejgeefkeeiseguvggssghughhsrdhg nhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 17 Nov 2024 14:18:47 -0500 (EST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295559 Archived-At: Hi! On 17/11/2024 01:26, Marius Kjeldahl wrote: > When using js-ts-mode, after multiline function parameter lists, or > multiline if clauses, Emacs typically adds two spaces indentation > after where the previous line ends. But because that line is already > indented, the effective indentation becomes four spaces (compare to > where the function definition or if clause starts). I would like this > to be only two. This is most likely a preference, but still. > > I haven't been able to figure out if it is possible to customize Emacs > to do what I want. Or even learn where I can dig in and figure out > what I need to change to accomplish it. I've tried a reddit group and > also posted an issue on the tree-sitter github repo. But was told the > correct place to report it is as an Emacs bug. > > So any pointers or suggestion? It would help if you also give specific examples of code where incorrect indentation occurs. People can guess, but they might not guess all the cases you want. Just paste the code inside email, assuming monospaced text. (And to clarify how this mailing list works: please use "reply all", so that the bug# email address is retained in To:).