From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marius Kjeldahl Newsgroups: gmane.emacs.bugs Subject: bug#74386: Tree-sitter javascript indentation Date: Sun, 17 Nov 2024 20:21:37 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34593"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74386@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 17 20:23:32 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 1tCkrr-0008lr-Rk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Nov 2024 20:23:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCkrR-0005bs-UT; Sun, 17 Nov 2024 14:23:06 -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 1tCkrO-0005RW-5s for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 14:23:03 -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 1tCkrN-0005zB-TI for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 14:23:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=jquOEaP/gD8E4Tvw5Dr79rfAEcLDAocQ4b1b3BwajSY=; b=AGqWSzVUo9T8G9268t/AhkFfMNKMa20gzumIjAmAoRDkyyF/QGgAPbqf8x7TDfIDftappzjCy8L57iunigia2Wm0WfVb25mDHRMblWxOVDmVfUMNKL+Hesjs8v2BZR50M/xXEXKFpUtP5+CCp0f9/kCHleIfpd9XeyMxyvPDG2gCzcIQagxcTXvKgLICrBR+5Z3Q4hXnVsqV6teyDUEhEmWTnOoX+N7A2QEYx3AkWL5kQ7x1o9SzDl++Rg3Cw1yGsgU4WDntzyg3iR6IDOMMwR5sg2OSXFGhYsURU2gWCHeH/XTDVW+OAUf3IB9v/kqc31P3blfNW0aol2QtSPSbOw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCkrN-0001w5-Oj for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 14:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Marius Kjeldahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Nov 2024 19:23: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.17318713767426 (code B ref 74386); Sun, 17 Nov 2024 19:23:01 +0000 Original-Received: (at 74386) by debbugs.gnu.org; 17 Nov 2024 19:22:56 +0000 Original-Received: from localhost ([127.0.0.1]:58663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCkrH-0001vh-QL for submit@debbugs.gnu.org; Sun, 17 Nov 2024 14:22:56 -0500 Original-Received: from mail-oa1-f53.google.com ([209.85.160.53]:61751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCkrF-0001vN-RT for 74386@debbugs.gnu.org; Sun, 17 Nov 2024 14:22:54 -0500 Original-Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-29692ad4b42so14064fac.3 for <74386@debbugs.gnu.org>; Sun, 17 Nov 2024 11:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731871308; x=1732476108; 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=jquOEaP/gD8E4Tvw5Dr79rfAEcLDAocQ4b1b3BwajSY=; b=W+r4vQV1h42MwJOvZ18NE6QD6L1cO4ueVzYask2AdnzS/io6GdCsjfalogG8fnH6OG RaAYN2tHBmIrLMIj+Dboe3dPFPsgLKXs3e+Uj5DSGyOdbNnGmYdHlsS7232h2KlVzZRr gMvl/CZ0/sW6Bu2nkmbWuLTKiwLsJaW9YR/oSt5Vw5PYK3muwpyGMKRiMci2Ml4JsJWj Rfen8G+uCtLBojiI5jMysMX8q4j0JZSZzD6Z4a3MLoCrGmm7ntTgqnU4nMWxJWrOdIX7 fZgupGlMUEMZ4fpyCEzj6wGv/se3ojez1PXTpSijqoQqyfDI0cDC1cluZWYL1nQX/kjz qpTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731871308; x=1732476108; 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=jquOEaP/gD8E4Tvw5Dr79rfAEcLDAocQ4b1b3BwajSY=; b=a4JwFZuG4agxCR/V4w2v06KNqQ+5wuekM3sYHYp7kL+fMDBTGTfTf6JvFy7FSrPkpI jTxGD8mmblanBJ7TKrUb4Qpu28PKZf6dq9ychAOLLWFvyFniKIEQlIQHPrp3gM1Br+Qr dzQVLsV0/WK/LfV6LfrLxh80MUqJQSu1eUJjJ4Ctz1bAQf0i3Qhx867dMdwkUB5vaoE4 yCILVbS0VorpOKV0MzwAWuMfG7acxUdDWtBvlEjxF6PTKNa97wJpKgp2/riJvfnaf8Ni rb3zVB0ghR3zihmnCnhMmHPYr+k3/qdMlZ5bdItZfXHSsWjkeb6yf1JmC+IYMX5yVHep cGBg== X-Gm-Message-State: AOJu0Yz/Pf/xahR0p760kUwoba5DcgsNOirtPQa1gtpkD0ACtY2Eekjg z2X/UT7/KKYI0LYYt9A+26aNaTYUVvXlD/9HriNyieEvtQMGRUWz4nBrkoCjvOuhr5hMaw/A4RB oB2fXXfDEH2N64pdZ5zXM5rPBhLM= X-Google-Smtp-Source: AGHT+IGmGGh6nw3hKMbpbn2SK//oiAaHO36BRln68OmnKlChoJpHh+sGyQr2XAUqp//coB3YO6Ts6jD+4SYsUYyZexM= X-Received: by 2002:a05:6870:96a2:b0:277:f301:40d5 with SMTP id 586e51a60fabf-2962dfeea2fmr6795566fac.31.1731871308129; Sun, 17 Nov 2024 11:21:48 -0800 (PST) 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:295560 Archived-At: Great, thanks. Here are two examples (fingers crossed): function a(b, c) { ....d(); and if (clause1 && clause2) { ....callSomeFunc(); Notice in both cases the four dots "...." representing spaces used for indentation. I would like only two dots (two spaces) for those specific examples. Thanks, Marius K. On Sun, 17 Nov 2024 at 20:18, Dmitry Gutov wrote: > > 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:).