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
Comments should ideally be wrapped at a certain line length to maintain readability. Roblox's style guide suggests 80, which is what I use, but I've also seen people use 120 or any random number.
This should ideally apply only to comments that on on lines by themselves (blah() --todo foobar shouldn't be formatted) and wrap at word boundaries (which can be accomplished with a basic regex pattern). To avoid styling the comment or ruining LDoc, it should maintain any trivia at the beginning of the comment (e.g. preserve --- and -- ).
The text was updated successfully, but these errors were encountered:
Comments are a tricky one here, as they can contain absolutely anything.
People can create diagrams, pieces of text, commented out code, or whatever they want, using both single line or multi line comments.
Formatting comments (which I was initially doing pre-release) is invasive, as it may lead to unwanted changes. We don't know what the comment is about.
This is possibly a good candidate for a separate tool. Formatting comments I think is a completely separate task for the reasons already stated. Those who wanted could use both StyLua and the new tool for this desired effect.
I am closing this as I do not believe I will be formatting comments anytime soon.
I think the only thing that I would likely format would he LuaDoc/LDoc comments, as they have a specific structure. It's unlikely that will happen anytime soon as I have no use case for it, but if you do, feel free to open up an issue about it.
Comments should ideally be wrapped at a certain line length to maintain readability. Roblox's style guide suggests 80, which is what I use, but I've also seen people use 120 or any random number.
This should ideally apply only to comments that on on lines by themselves (
blah() --todo foobar
shouldn't be formatted) and wrap at word boundaries (which can be accomplished with a basic regex pattern). To avoid styling the comment or ruining LDoc, it should maintain any trivia at the beginning of the comment (e.g. preserve---
and--
).The text was updated successfully, but these errors were encountered: