unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68297: [PATCH] Support indented continuation lines in lua-ts-mode
@ 2024-01-06 18:56 john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-06 22:37 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-07  0:39 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 5+ messages in thread
From: john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-06 18:56 UTC (permalink / raw)
  To: 68297

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.





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

end of thread, other threads:[~2024-01-11 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-06 18:56 bug#68297: [PATCH] Support indented continuation lines in lua-ts-mode john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-06 22:37 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-06 22:57   ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-07  0:39 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 20:52   ` Stefan Kangas

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).