GNU bug report logs -
#70785
[PATCH] Improve indentation in 'lua-ts-mode'
Previous Next
Reported by: john muhl <jm <at> pub.pink>
Date: Sun, 5 May 2024 12:55:01 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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'
This bug report was last modified 1 year and 70 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.