From unknown Fri Sep 19 20:43:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Feb 2024 02:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69088 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 69088@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170779128814939 (code B ref -1); Tue, 13 Feb 2024 02:29:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Feb 2024 02:28:08 +0000 Received: from localhost ([127.0.0.1]:38204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZiWm-0003st-6T for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:28:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:39802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZiWi-0003rl-TE for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:28:05 -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 ) id 1rZh9q-0007lq-B3 for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 20:00:22 -0500 Received: from out-185.mta1.migadu.com ([2001:41d0:203:375::b9]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZh9o-00038A-HB for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 20:00:22 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1707786014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lS7dnnITvrydze9pxrWbXB19Ygj32asNo8LmhLFN/oU=; b=day3irQRwcPx/uYHdns6miuhfIVF+xDk3c7LUkdD/wsUf70uSyzNsInU6VWuf4wpLgOxz0 r1XGSe5OLboE/UKITKfTEhCBjPOhjQPxWdE+O6LWeBWxwjTfE34NxWfENOdzXL+8gox1L0 IK6L9RWu/uA+8LC0fQqnvOAIE5Spz2c= From: john muhl Date: Mon, 12 Feb 2024 19:00:04 -0600 Message-ID: <87a5o5rxez.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::b9; envelope-from=jm@pub.pink; helo=out-185.mta1.migadu.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, 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.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Tags: patch lua-ts-mode supports aligning table fields to the first field so that you can have code like: local t =3D { a =3D 1, b =3D 2, } However if you prefer to put the first field on a newline like: local t =3D { a =3D 1, b =3D 2, } the indentation doesn=E2=80=99t happen until you press RET after the first comma. So you initially have something like (where | is point): local t =3D { | } This patch fixes that so the initial indentation is correct from the beginn= ing: local t =3D { | } From unknown Fri Sep 19 20:43:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Feb 2024 02:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69088 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 69088@debbugs.gnu.org Received: via spool by 69088-submit@debbugs.gnu.org id=B69088.170779284519536 (code B ref 69088); Tue, 13 Feb 2024 02:55:01 +0000 Received: (at 69088) by debbugs.gnu.org; 13 Feb 2024 02:54:05 +0000 Received: from localhost ([127.0.0.1]:38673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZivt-000552-D0 for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:54:05 -0500 Received: from out-172.mta1.migadu.com ([95.215.58.172]:46570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZivr-00054m-9w for 69088@debbugs.gnu.org; Mon, 12 Feb 2024 21:54:04 -0500 References: <87a5o5rxez.fsf@pub.pink> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1707792794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p5CyDiLNwPPToQiIUnpPtK24OagDBBYD8/JY3R6NBCA=; b=U8QY/4SZKIJCkZ3CWuQJ3S7FnZ7ID9IyaD3swdxpuZUBxe4dPPx3GMFpLAZ1A2aggOaFTH 80AMLwU2Mb5sX3v0qjqU0URQW6344EboSshxtHJkXllsIVAX7vthhFUulJC8WArQa0yKfF g2PCe+LO+voA1IUY3OcJbMyiF1Glc+k= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: john muhl Date: Mon, 12 Feb 2024 20:49:05 -0600 In-reply-to: Message-ID: <87zfw5qdm1.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Sorry for the duplicate. I thought there had been an error while sending initially. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eagerly-indent-first-field-in-tables-in-lua-ts-mode.patch >From 94de38c493fdc666cd23718d879aaad08e3e6abb Mon Sep 17 00:00:00 2001 From: john muhl Date: Mon, 12 Feb 2024 18:46:51 -0600 Subject: [PATCH] Eagerly indent first field in tables in lua-ts-mode * lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules): Properly indent the first field of a table when it appears on a line by itself. (bug#69088) --- lisp/progmodes/lua-ts-mode.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index dc2a8fcec1e..15256cc7903 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -317,6 +317,9 @@ lua-ts--simple-indent-rules (node-is ")") (node-is "}")) standalone-parent 0) + ((and (lambda (node &rest _) (null node)) + (parent-is "table_constructor")) + standalone-parent lua-ts-indent-offset) ((or (and (parent-is "arguments") lua-ts--first-child-matcher) (and (parent-is "parameters") lua-ts--first-child-matcher) (and (parent-is "table_constructor") lua-ts--first-child-matcher)) -- 2.41.0 --=-=-=-- From unknown Fri Sep 19 20:43:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Feb 2024 03:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69088 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: john muhl , 69088@debbugs.gnu.org Received: via spool by 69088-submit@debbugs.gnu.org id=B69088.170779452223924 (code B ref 69088); Tue, 13 Feb 2024 03:23:02 +0000 Received: (at 69088) by debbugs.gnu.org; 13 Feb 2024 03:22:02 +0000 Received: from localhost ([127.0.0.1]:39034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZjMv-0006Dj-Fg for submit@debbugs.gnu.org; Mon, 12 Feb 2024 22:22:01 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:55601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZjMu-0006DH-73 for 69088@debbugs.gnu.org; Mon, 12 Feb 2024 22:22:00 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DB9375C010F; Mon, 12 Feb 2024 22:21:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 12 Feb 2024 22:21:37 -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=1707794497; x=1707880897; bh=+bMqL/jQrSipwx9H/kdxJDIHPYFCOrIGDszHqwrJMPc=; b= L06WCsHCdYvoT0TzT54kBPVrLfpszc8Oawyq211YBNC111BATZof/vo5zcIxMcEs 0NEqE6HlqNHNYuQMaGB4cYPfdNHp/ecCZecfeB5AdMQaL4n0Hd6RaxbFLtj0iwh4 N4xkHh3cDxFNq+SDq9Pu7xwU04Z3FEkCSCayTUcjGLRXL89akLQhJQ6M0a+aSOee tuVmLqMSzJmm+0F9bIFPCw0ETQ3yBL+xT8HlroFZufuUMMmjIfabBuTGew1jauKc Q+4jNN5GS+fkq6bhSTfd3CJtqY6X9sc5l1/IhAWeo2oBuU+NAHVPhUn41imLPrcp jF2JatqoMAKzhO5T9Rx8cA== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707794497; x= 1707880897; bh=+bMqL/jQrSipwx9H/kdxJDIHPYFCOrIGDszHqwrJMPc=; b=f L50RK1x2h4p54a3P/ghH+AjQmJwq2iggOM0czw+Q8Q7Z7onQUYxC2IRp/bhJCj95 am1FdTZG+crZO5kYBoCITICN8csJu08RtTDoUNd65iiOgFSKASYB6tNRaA/lw8Ds jKJLzEfNcUTRRuSUJo/OOyyovf/Pv/n9aWjSYONAsm8cpVx1EJ/uxfkb4U44xlDp +8CdsDpMm1iQ28JTjFpU5GzwLdsjsnVwN4Sdz5QrDu+FsfFK46gutyUKn0//S8YM 2NMepuYYIUVAyX1Qp6klblqR26Kuh1aM0FhDn7VVOmfoQuMnnqaVTyq2QxNDD+Ll 9fKtngnmEpPRDLW7o2WQQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeggdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnheptdfhuedvtdevleegueelvedvjeevheffveevhedvuefftdefhfdvueeggfetgfdt necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Feb 2024 22:21:36 -0500 (EST) Message-ID: <2ec322a0-e772-4191-b416-e9bf49a6d4e6@gutov.dev> Date: Tue, 13 Feb 2024 05:21:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US References: <87a5o5rxez.fsf@pub.pink> <87zfw5qdm1.fsf@pub.pink> From: Dmitry Gutov In-Reply-To: <87zfw5qdm1.fsf@pub.pink> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 13/02/2024 04:49, john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > + ((and (lambda (node &rest _) (null node)) > + (parent-is "table_constructor")) That's probably the same as (match null "table_constructor") From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 22:34:16 2024 Received: (at control) by debbugs.gnu.org; 13 Feb 2024 03:34:16 +0000 Received: from localhost ([127.0.0.1]:39186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZjYm-0006g7-6f for submit@debbugs.gnu.org; Mon, 12 Feb 2024 22:34:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZjYi-0006fg-61; Mon, 12 Feb 2024 22:34:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZjYL-0003fs-2V; Mon, 12 Feb 2024 22:33:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rwKd2mVbOP0L9mn4sTnqlOOWLpOmkt5ey1Ma5b4i2Rc=; b=fo2/yFk/iOi3 /m52dcTypUvarSYqkUt4C3ah1HdltaTlBi+YkQIvaMqqRWbOj/YjxyCCsdI7xXkPR9uR3soCzKGqV jfL63/zL5/CYabvonFNayBf30p77OrcIkcpAwpJnW2Zgcgt2fvLj0sUweGk0lm5Z5o7GVEEaUpkzC MfPJb2VSuyCsa2bxhAZuSDLoifxOOFrubq6gAgLZkHAtucBmDvWptCfLTEO4HZx0a7l/ARypFRAYU 1rEUQt/IOpD/6xTIDuOrnzvW2oV8Ig5jL9C2kl0b5qmcOr1lEp2LMFXnebHM6mk0oxpwAq++dHyMi Ajnua6DjL8Hgx0ypI8OYrw==; Date: Tue, 13 Feb 2024 05:33:47 +0200 Message-Id: <868r3pqbqc.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <87sf1x6tu0.fsf@pub.pink> (bug-gnu-emacs@gnu.org) Subject: Re: bug#69089: [PATCH] Eagerly indent first field in tables in lua-ts-mode References: <87sf1x6tu0.fsf@pub.pink> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control Cc: 69089@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 69089 69088 thanks > Date: Mon, 12 Feb 2024 19:23:03 -0600 > From: john muhl via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Tags: patch > > lua-ts-mode supports aligning sibling fields to the first field > so that you can have code like: Merging the duplicate report. From unknown Fri Sep 19 20:43:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Feb 2024 03:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69088 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Dmitry Gutov Cc: 69088@debbugs.gnu.org Received: via spool by 69088-submit@debbugs.gnu.org id=B69088.17077959985357 (code B ref 69088); Tue, 13 Feb 2024 03:47:01 +0000 Received: (at 69088) by debbugs.gnu.org; 13 Feb 2024 03:46:38 +0000 Received: from localhost ([127.0.0.1]:39337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZjkj-0001OK-Gz for submit@debbugs.gnu.org; Mon, 12 Feb 2024 22:46:37 -0500 Received: from out-176.mta1.migadu.com ([95.215.58.176]:47956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZjkg-0001Nr-Ms for 69088@debbugs.gnu.org; Mon, 12 Feb 2024 22:46:35 -0500 References: <87a5o5rxez.fsf@pub.pink> <87zfw5qdm1.fsf@pub.pink> <2ec322a0-e772-4191-b416-e9bf49a6d4e6@gutov.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1707795946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qYOckQ+aDCCcEMWzlXRoueAbHQhR+TyBnesUvpkxve8=; b=wPfRNVYgHVSosDIXxwv7PT/8lIhBPEJeNRGXxLRht2yMI5O5jrAOP23Y/NkBmZSYI0NzJk 5giOpMyvCOcPMeNNxqHJlbX1GU3KOHhc0qFqVkXrtJJ/ayJP3BZKblvZNhthxjtisLWLUw yT04T+Rs0rhaDyn+8KaAEY2TiWshKDE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: john muhl Date: Mon, 12 Feb 2024 21:42:01 -0600 In-reply-to: <2ec322a0-e772-4191-b416-e9bf49a6d4e6@gutov.dev> Message-ID: <87eddhqb6o.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) --=-=-= Content-Type: text/plain Dmitry Gutov writes: > On 13/02/2024 04:49, john muhl via Bug reports for GNU Emacs, the > Swiss army knife of text editors wrote: >> + ((and (lambda (node &rest _) (null node)) >> + (parent-is "table_constructor")) > > That's probably the same as (match null "table_constructor") Yes it is. Thanks for the pointer. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eagerly-indent-first-field-in-tables-in-lua-ts-mode.patch >From 2ccb8aaff8c08f1cb55f66c4b556c1f8aedc4d9e Mon Sep 17 00:00:00 2001 From: john muhl Date: Mon, 12 Feb 2024 18:46:51 -0600 Subject: [PATCH] Eagerly indent first field in tables in lua-ts-mode * lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules): Properly indent the first field of a table when it appears on a line by itself. (bug#69088) --- lisp/progmodes/lua-ts-mode.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index dc2a8fcec1e..c7f5ac50b04 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -317,6 +317,8 @@ lua-ts--simple-indent-rules (node-is ")") (node-is "}")) standalone-parent 0) + ((match null "table_constructor") + standalone-parent lua-ts-indent-offset) ((or (and (parent-is "arguments") lua-ts--first-child-matcher) (and (parent-is "parameters") lua-ts--first-child-matcher) (and (parent-is "table_constructor") lua-ts--first-child-matcher)) -- 2.41.0 --=-=-=-- From unknown Fri Sep 19 20:43:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: john muhl Subject: bug#69088: closed (Re: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode) Message-ID: References: <865xynv55n.fsf@gnu.org> <87a5o5rxez.fsf@pub.pink> X-Gnu-PR-Message: they-closed 69088 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 69088@debbugs.gnu.org Date: Sat, 17 Feb 2024 08:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1708160342-25485-1" This is a multi-part message in MIME format... ------------=_1708160342-25485-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 69088@debbugs.gnu.org. --=20 69088: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69088 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1708160342-25485-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 69088-done) by debbugs.gnu.org; 17 Feb 2024 08:58:45 +0000 Received: from localhost ([127.0.0.1]:60446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbGWy-0006cZ-27 for submit@debbugs.gnu.org; Sat, 17 Feb 2024 03:58:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbGWu-0006cM-O7 for 69088-done@debbugs.gnu.org; Sat, 17 Feb 2024 03:58:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbGWV-0003fz-IE; Sat, 17 Feb 2024 03:58:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=y1ClibWzVuv0bcUzXi056qZUaV6VuR41myG49RTTe+w=; b=VfHvqTD2RJyd 39/RcLRPcqgv30j+7ObHlJuNP+fJ6gSEwrJFwPg1P6KYJKTMTETf5s3TLFC+va3h6+0edIddfpBKq 4K16UrquydYYj8aVQD9BZYYQK9QwHQ3OKwDhFjvJYLCpTuxIfOdNGNfuSRpVcDpecZjNhIi5+A/VV XtbnhEFLdxsuViSuF0zQvCudCtvffK4ECrg7BsLgbryPfC9UloVEBDwY/9RaDzyjjlT0kUFGr4J76 hLYuWWd1nl6SYQDmi+wzgPjlmwHAA1h50MvI9/SKphAswk7J/dR84Jq1/bAiqo5KTMKqJW1t3+oUr LMUa+6hthJBjet958kMzkQ==; Date: Sat, 17 Feb 2024 10:58:12 +0200 Message-Id: <865xynv55n.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <87eddhqb6o.fsf@pub.pink> (bug-gnu-emacs@gnu.org) Subject: Re: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode References: <87a5o5rxez.fsf@pub.pink> <87zfw5qdm1.fsf@pub.pink> <2ec322a0-e772-4191-b416-e9bf49a6d4e6@gutov.dev> <87eddhqb6o.fsf@pub.pink> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 69088-done Cc: dmitry@gutov.dev, 69088-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > Cc: 69088@debbugs.gnu.org > Date: Mon, 12 Feb 2024 21:42:01 -0600 > From: john muhl via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Dmitry Gutov writes: > > > On 13/02/2024 04:49, john muhl via Bug reports for GNU Emacs, the > > Swiss army knife of text editors wrote: > >> + ((and (lambda (node &rest _) (null node)) > >> + (parent-is "table_constructor")) > > > > That's probably the same as (match null "table_constructor") > > Yes it is. Thanks for the pointer. Thanks, installed on master, and closing the bug. ------------=_1708160342-25485-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Feb 2024 02:28:08 +0000 Received: from localhost ([127.0.0.1]:38204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZiWm-0003st-6T for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:28:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:39802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZiWi-0003rl-TE for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:28:05 -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 ) id 1rZh9q-0007lq-B3 for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 20:00:22 -0500 Received: from out-185.mta1.migadu.com ([2001:41d0:203:375::b9]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZh9o-00038A-HB for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 20:00:22 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1707786014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lS7dnnITvrydze9pxrWbXB19Ygj32asNo8LmhLFN/oU=; b=day3irQRwcPx/uYHdns6miuhfIVF+xDk3c7LUkdD/wsUf70uSyzNsInU6VWuf4wpLgOxz0 r1XGSe5OLboE/UKITKfTEhCBjPOhjQPxWdE+O6LWeBWxwjTfE34NxWfENOdzXL+8gox1L0 IK6L9RWu/uA+8LC0fQqnvOAIE5Spz2c= From: john muhl To: bug-gnu-emacs@gnu.org Subject: [PATCH] Eagerly indent first field in tables in lua-ts-mode Date: Mon, 12 Feb 2024 19:00:04 -0600 Message-ID: <87a5o5rxez.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::b9; envelope-from=jm@pub.pink; helo=out-185.mta1.migadu.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, 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.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Tags: patch lua-ts-mode supports aligning table fields to the first field so that you can have code like: local t =3D { a =3D 1, b =3D 2, } However if you prefer to put the first field on a newline like: local t =3D { a =3D 1, b =3D 2, } the indentation doesn=E2=80=99t happen until you press RET after the first comma. So you initially have something like (where | is point): local t =3D { | } This patch fixes that so the initial indentation is correct from the beginn= ing: local t =3D { | } ------------=_1708160342-25485-1-- From unknown Fri Sep 19 20:43:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: john muhl Subject: bug#69089: closed (Re: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode) Message-ID: References: <865xynv55n.fsf@gnu.org> <87sf1x6tu0.fsf@pub.pink> X-Gnu-PR-Message: they-closed 69089 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 69089@debbugs.gnu.org Date: Sat, 17 Feb 2024 08:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1708160342-25485-3" This is a multi-part message in MIME format... ------------=_1708160342-25485-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 69089@debbugs.gnu.org. --=20 69088: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69088 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1708160342-25485-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 69088-done) by debbugs.gnu.org; 17 Feb 2024 08:58:45 +0000 Received: from localhost ([127.0.0.1]:60446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbGWy-0006cZ-27 for submit@debbugs.gnu.org; Sat, 17 Feb 2024 03:58:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbGWu-0006cM-O7 for 69088-done@debbugs.gnu.org; Sat, 17 Feb 2024 03:58:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbGWV-0003fz-IE; Sat, 17 Feb 2024 03:58:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=y1ClibWzVuv0bcUzXi056qZUaV6VuR41myG49RTTe+w=; b=VfHvqTD2RJyd 39/RcLRPcqgv30j+7ObHlJuNP+fJ6gSEwrJFwPg1P6KYJKTMTETf5s3TLFC+va3h6+0edIddfpBKq 4K16UrquydYYj8aVQD9BZYYQK9QwHQ3OKwDhFjvJYLCpTuxIfOdNGNfuSRpVcDpecZjNhIi5+A/VV XtbnhEFLdxsuViSuF0zQvCudCtvffK4ECrg7BsLgbryPfC9UloVEBDwY/9RaDzyjjlT0kUFGr4J76 hLYuWWd1nl6SYQDmi+wzgPjlmwHAA1h50MvI9/SKphAswk7J/dR84Jq1/bAiqo5KTMKqJW1t3+oUr LMUa+6hthJBjet958kMzkQ==; Date: Sat, 17 Feb 2024 10:58:12 +0200 Message-Id: <865xynv55n.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <87eddhqb6o.fsf@pub.pink> (bug-gnu-emacs@gnu.org) Subject: Re: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode References: <87a5o5rxez.fsf@pub.pink> <87zfw5qdm1.fsf@pub.pink> <2ec322a0-e772-4191-b416-e9bf49a6d4e6@gutov.dev> <87eddhqb6o.fsf@pub.pink> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 69088-done Cc: dmitry@gutov.dev, 69088-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > Cc: 69088@debbugs.gnu.org > Date: Mon, 12 Feb 2024 21:42:01 -0600 > From: john muhl via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Dmitry Gutov writes: > > > On 13/02/2024 04:49, john muhl via Bug reports for GNU Emacs, the > > Swiss army knife of text editors wrote: > >> + ((and (lambda (node &rest _) (null node)) > >> + (parent-is "table_constructor")) > > > > That's probably the same as (match null "table_constructor") > > Yes it is. Thanks for the pointer. Thanks, installed on master, and closing the bug. ------------=_1708160342-25485-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Feb 2024 02:40:26 +0000 Received: from localhost ([127.0.0.1]:38409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZiif-0004Nf-5s for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:40:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:39802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZiWh-0003rl-Fk for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:28:04 -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 ) id 1rZhW0-0002nQ-Ae for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 20:23:16 -0500 Received: from out-183.mta1.migadu.com ([95.215.58.183]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZhVy-0006Uy-Dh for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 20:23:16 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1707787391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4iBBf4vja30zMwgp0K/ixD45TszeHbp7Czs6gjjqEg=; b=SFg1xFyQmz9F4/HyxXEszGgJ/19hsteFoRrjVUHWqr+ul0Kk43NW4dESGJ/KDTMjU6Ku/I jHLVEMenRqqmUNWZRZefryJ8xA6K3tN+YjPZ03fAhwW3LXZVtqN94rskRBuv4ZZY/TIpS6 2efD4IlNGqeZ0UBCys7IvBmTBWFPzcQ= From: john muhl To: bug-gnu-emacs@gnu.org Subject: [PATCH] Eagerly indent first field in tables in lua-ts-mode Date: Mon, 12 Feb 2024 19:23:03 -0600 Message-ID: <87sf1x6tu0.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.183; envelope-from=jm@pub.pink; helo=out-183.mta1.migadu.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, 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.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Tags: patch lua-ts-mode supports aligning sibling fields to the first field so that you can have code like: local t =3D { a =3D 1, b =3D 2, } However if you prefer to put the first field on a newline like: local t =3D { a =3D 1, b =3D 2, } the indentation doesn=E2=80=99t happen until you press RET after the first comma. So you initially have something like (where | is point): local t =3D { | } This fixes that so the initial indentation is correct from the beginning: local t =3D { | } ------------=_1708160342-25485-3--