Benjamin-Dobell / IntelliJ-Luanalysis

Type-safe Lua IDE — IntelliJ IDEA plugin
Apache License 2.0
155 stars 22 forks source link

Lua code formatting moves some end-of-line comments to a new line #161

Open wushu037 opened 1 year ago

wushu037 commented 1 year ago

Environment

Name Version
IDEA version CLion 2023.2.1
Luanalysis version v1.4.0
OS MacOS 13.5.2

Preferences

image

Lua

Name Setting
Language level Lua 5.4.6

Desc

End-of-line comments at the beginning of a block of statements are formatted with a line break. This may be mandatory, as I haven't found a setting for it anywhere.

For example, the following code

local function a () -- 1

end

if true then -- 2

else
end

would be formatted as

local function a ()
    -- 1

end

if true then
    -- 2

else
end