You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stylua will format a documented function defined as a table value in a way that EmmyLua complains about @param doc-comment.
Before formatting ↓, ---@param n is correctly recognized by EmmyLua (through lua-language-server). doc-comment lines are indented the same above the function(…) line. No complains from EmmyLua
local t = {
plus_one =
---@param n number
---@return number
function(n)
return n + 1
end,
}
After formatting ↓, ---@param n is moved to the key line, and it's mis-aligned with the rest of the doc-comment lines, in this case the @return one. EmmyLua complains Undefined param n on ---@param n number .
local t = {
plus_one = ---@param n number
---@return number
function(n)
return n + 1
end,
}
Expected behavior: doc-comment alignment has higher priority, so all doc-comment lines are kept at same indentation. Don't mind if this results in function(…) line having a different indent
The text was updated successfully, but these errors were encountered:
Stylua will format a documented function defined as a table value in a way that EmmyLua complains about
@param
doc-comment.Before formatting ↓,
---@param n
is correctly recognized by EmmyLua (through lua-language-server). doc-comment lines are indented the same above thefunction(…)
line. No complains from EmmyLuaAfter formatting ↓,
---@param n
is moved to the key line, and it's mis-aligned with the rest of the doc-comment lines, in this case the@return one
. EmmyLua complainsUndefined param n
on---@param n number
.Expected behavior: doc-comment alignment has higher priority, so all doc-comment lines are kept at same indentation. Don't mind if this results in
function(…)
line having a different indentThe text was updated successfully, but these errors were encountered: