unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: john muhl <jm@pub.pink>
To: 70785@debbugs.gnu.org
Subject: bug#70785: [PATCH] Improve indentation in 'lua-ts-mode'
Date: Sun, 05 May 2024 07:54:04 -0500	[thread overview]
Message-ID: <87zft4mnbn.fsf@pub.pink> (raw)

Tags: patch

I was contacted off-list about a few tweaks to the indentation.
They seemed fine so here they are.

1. Change it so that comments are ignored when indenting table
fields and function arguments/parameters:

  -- before
  local mt = { -- the comment
               first = 1,
               second = 2,
             }

  -- after
  local mt = { -- the comment
    first = 1,
    second = 2,
  }

2. It also changes how tables are handled in function arguments:

  -- before
  fn(true, {
             x = 1,
             y = 0,
           })

  -- after
  fn(true, {
    x = 1,
    y = 0,
  })

3. And it changes how simple use of an anonymous function is indented:

  -- before
  fn(function()
       print'ok'
     end)

  -- after
  fn(function()
    print'ok'
  end)

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-05-02 built on localhost
Repository revision: 962bb71b4a813eb9c3832494746695d32d6f9109
Repository branch: master
System Description: Fedora Linux 39 (Thirty Nine)

Configured using:
 'configure --with-pgtk --prefix=/home/jm/.local'





             reply	other threads:[~2024-05-05 12:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 12:54 john muhl [this message]
2024-05-05 13:26 ` bug#70785: [PATCH] Improve indentation in 'lua-ts-mode' john muhl
2024-05-09  3:38   ` Yuan Fu

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zft4mnbn.fsf@pub.pink \
    --to=jm@pub.pink \
    --cc=70785@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).