Subject: [PATCH] Eagerly indent first field in tables in lua-ts-mode
From: john muhl <[email-masked]>
To: [email-masked]
Date: Mon, 12 Feb 2024 19:00:04 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

lua-ts-mode supports aligning table fields to the first field so that
you can have code like:

  local t = { a = 1,
              b = 2, }

However if you prefer to put the first field on a newline like:

  local t = {
      a = 1,
      b = 2,
  }

the indentation doesn’t happen until you press RET after the first
comma. So you initially have something like (where | is point):

  local t = {
  |
  }

This patch fixes that so the initial indentation is correct from the beginning:

  local t = {
      |
  }