GNU bug report logs - #68297
[PATCH] Support indented continuation lines in lua-ts-mode

Previous Next

Package: emacs;

Reported by: john muhl <jm <at> pub.pink>

Date: Sat, 6 Jan 2024 22:03:01 UTC

Severity: wishlist

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: john muhl <jm <at> pub.pink>
Subject: bug#68297: closed (Re: bug#68297: [PATCH] Support indented
 continuation lines in lua-ts-mode)
Date: Thu, 11 Jan 2024 20:53:02 +0000
[Message part 1 (text/plain, inline)]
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 68297 <at> debbugs.gnu.org.

-- 
68297: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68297
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: john muhl <jm <at> pub.pink>
Cc: 68297-done <at> debbugs.gnu.org
Subject: Re: bug#68297: [PATCH] Support indented continuation lines in
 lua-ts-mode
Date: Thu, 11 Jan 2024 12:52:23 -0800
john muhl <jm <at> pub.pink> 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).

[Message part 3 (message/rfc822, inline)]
From: john muhl <jm <at> pub.pink>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Support indented continuation lines in lua-ts-mode
Date: Sat, 06 Jan 2024 12:56:17 -0600
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.



This bug report was last modified 1 year and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.