-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support LuaCATS comment formatting #851
Comments
It will be somewhat difficult to support this. We currently don't bother formatting comments at all, since comments could consist of anything. We could support formatting specifically doc comments, however there is no "standardised" way of defining documentation comments in Lua (luadoc, emmylua, LuaCATs, moonwave, etc.), so it isn't clear which one, if any, we should support. |
At the very minimum, we could enforce consistent whitespace in doc comments: ---text1
--- text2
--- @param a
---@return string becomes: --- text1
--- text2
--- @param a
--- @return string Where the padding maybe configurable. |
LuaCATS offers a way to specify the types through comments. Currently, stylua does not format it. For example, the code below:
should be formatted as:
The text was updated successfully, but these errors were encountered: