I have a table that is a list of command line arguments, and I would like flags and their values to be on the same line so that it is more readable.
local args = {
"--foo", "foo",
"--bar", "bar",
"pos1",
"pos2",
}
Understandably, stylua formats this with each item on its own line:
local args = {
"--foo",
"foo",
"--bar",
"bar",
"pos1",
"pos2",
}
So, I add -- stylua: ignore start and -- stylua: ignore end:
local args = {
-- stylua: ignore start
"--foo", "foo",
"--bar", "bar",
"pos1",
"pos2",
-- stylua: ignore end
}
But it messes up the formatting:
local args = {
-- stylua: ignore start
"--foo",
"foo",
"--bar",
"bar",
"pos1",
"pos2",
-- stylua: ignore end
}
The expected behavior is to not touch anything from the -- stylua: ignore start and the newline after --stylua: ignore end.
I have a table that is a list of command line arguments, and I would like flags and their values to be on the same line so that it is more readable.
Understandably,
styluaformats this with each item on its own line:So, I add
-- stylua: ignore startand-- stylua: ignore end:But it messes up the formatting:
The expected behavior is to not touch anything from the
-- stylua: ignore startand the newline after--stylua: ignore end.