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 20:49:05 -0600 Message-ID: <87zfw5qdm1.fsf@pub.pink> References: <87a5o5rxez.fsf@pub.pink> 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="30342"; mail-complaints-to="usenet@ciao.gmane.io" To: 69088@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 13 03:55:06 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 1rZiwq-0007gD-OI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Feb 2024 03:55:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZiwY-0006mA-6h; Mon, 12 Feb 2024 21:54:46 -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 1rZiwW-0006ly-Oq for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 21:54:44 -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 1rZiwW-0004wd-GD for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 21:54:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZiwn-00057Q-Js for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 21:55: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 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 Original-Received: via spool by 69088-submit@debbugs.gnu.org id=B69088.170779284519536 (code B ref 69088); Tue, 13 Feb 2024 02:55:01 +0000 Original-Received: (at 69088) by debbugs.gnu.org; 13 Feb 2024 02:54:05 +0000 Original-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 Original-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 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. In-reply-to: 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:279938 Archived-At: --=-=-= 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 --=-=-=--