Subject: bug#68297: closed (Re: bug#68297: [PATCH] Support indented continuation lines in lua-ts-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 11 Jan 2024 20:53:02 +0000

Your bug report

#68297: [PATCH] Support indented continuation lines in lua-ts-mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
68297: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68297
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#68297: [PATCH] Support indented continuation lines in lua-ts-mode
From: Stefan Kangas <[email-masked]>
To: john muhl <[email-masked]>
Cc: [email-masked]
Date: Thu, 11 Jan 2024 12:52:23 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

john muhl <[email-masked]> writes:

> ...and now I see that only handled top-level statements. This
> one works with nested ifs and variables too.

Thanks, installed on master (43b4993d73b).

Subject: [PATCH] Support indented continuation lines in lua-ts-mode
From: john muhl <[email-masked]>
To: [email-masked]
Date: Sat, 06 Jan 2024 12:56:17 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Add rules for indenting multi-line variables and if/elseif
statements, e.g.:

  local very_long_variable_name =
      "ABC"..
      "XYZ"
  local v = 123 *
      456 +
      789

  if a
      and b
      or c then
      print(1)
  elseif b
      and c
      or a then
      print(0)
  end

The lua-ts-indent-continuation-lines option can be set to nil to
keep if statements flush left:

  if a
  and b
  or c then
      print(1)
  elseif b
  and c
  or a then
      print(0)
  end

The option controlling this behavior in the EmmyLua code
formatter does not affect multi-line variables so neither does
lua-ts-indent-continuation-lines.