Benjamin-Dobell / IntelliJ-Luanalysis

Type-safe Lua IDE — IntelliJ IDEA plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

wushu037 opened this issue · comments

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