all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#70785: [PATCH] Improve indentation in 'lua-ts-mode'
@ 2024-05-05 12:54 john muhl
  2024-05-05 13:26 ` john muhl
  0 siblings, 1 reply; 3+ messages in thread
From: john muhl @ 2024-05-05 12:54 UTC (permalink / raw)
  To: 70785

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'





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-09  3:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-05 12:54 bug#70785: [PATCH] Improve indentation in 'lua-ts-mode' john muhl
2024-05-05 13:26 ` john muhl
2024-05-09  3:38   ` Yuan Fu

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.