From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode Date: Mon, 12 Feb 2024 21:42:01 -0600 Message-ID: <87eddhqb6o.fsf@pub.pink> References: <87a5o5rxez.fsf@pub.pink> <87zfw5qdm1.fsf@pub.pink> <2ec322a0-e772-4191-b416-e9bf49a6d4e6@gutov.dev> Reply-To: john muhl Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33888"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69088@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 13 04:47:09 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 1rZjlE-0008We-3p for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Feb 2024 04:47:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZjkt-0008IA-Bv; Mon, 12 Feb 2024 22:46:47 -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 1rZjkr-0008Hy-CC for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 22:46:45 -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 1rZjkr-0005r0-4C for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 22:46:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZjl7-0001Pw-Ur for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 22:47:01 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 69088-submit@debbugs.gnu.org id=B69088.17077959985357 (code B ref 69088); Tue, 13 Feb 2024 03:47:01 +0000 Original-Received: (at 69088) by debbugs.gnu.org; 13 Feb 2024 03:46:38 +0000 Original-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 Original-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 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. In-reply-to: <2ec322a0-e772-4191-b416-e9bf49a6d4e6@gutov.dev> X-Migadu-Flow: FLOW_OUT 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:279942 Archived-At: --=-=-= 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 --=-=-=--