From: john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 69088@debbugs.gnu.org
Subject: bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode
Date: Mon, 12 Feb 2024 20:49:05 -0600 [thread overview]
Message-ID: <87zfw5qdm1.fsf@pub.pink> (raw)
In-Reply-To: <handler.69088.B.170779128814939.ack@debbugs.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 85 bytes --]
Sorry for the duplicate. I thought there had been an error while
sending initially.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Eagerly-indent-first-field-in-tables-in-lua-ts-mode.patch --]
[-- Type: text/x-patch, Size: 1123 bytes --]
From 94de38c493fdc666cd23718d879aaad08e3e6abb Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
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
next prev parent reply other threads:[~2024-02-13 2:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 1:00 bug#69088: [PATCH] Eagerly indent first field in tables in lua-ts-mode john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.69088.B.170779128814939.ack@debbugs.gnu.org>
2024-02-13 2:49 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-02-13 3:21 ` Dmitry Gutov
2024-02-13 3:42 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-17 8:58 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zfw5qdm1.fsf@pub.pink \
--to=bug-gnu-emacs@gnu.org \
--cc=69088@debbugs.gnu.org \
--cc=jm@pub.pink \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.