-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support plain --[[ ]]
block comments
#104
Comments
For VSCode, you can create a snippet in your user snippets folder to create a doc comment: "Doc Comment": {
"prefix": "doc",
"body": [
"--[=[",
"\t$1",
"]=]"
]
}, Then, when you write I don't think parsing plain block comments is something we want to do. There are many plain doc comments out there in the wild, and I want it to be clear in the ecosystem that From an implementation perspective, this is also difficult to do, because we perform some validation and parsing before we even start looking at what tags the user has used. We would have to refactor some code to support this. The proposed solution is also incongruous with the existing doc comments (needing a Overall, I just want to keep things simple. I think most of the issues you brought up are actually issues with Lua tooling being bad (no surprise to any of us there) rather than a problem with Moonwave itself. |
It seems like there is already an open issue for Rewrap about this issue: stkb/Rewrap#290 |
I agree, this is better fixed at the tooling level, not as a part of Moonwave. Thanks for the detailed explanation |
A problem I have when writing moonwave docs is that typing out
--[=[ ]=]
is very tedious because it requires 7 keystrokes to write out: (The pipe|
represents the cursor position)Whereas with regular block comments it only takes 4 keystrokes, which is also easier to type out quickly since there is no alternating between brackets and equal signs.
Another issue I am having with
--[=[ ]=]
comments is that Rewrap does not recognize them as valid comments, so I have to manually set the line breaks for my documentation instead of having it handled via a keybind.It would be great if moonwave could parse plain doc comments. I realize that using
--[=[ ]=]
is because they are uncommon, so moonwave can make the assumption that any comment written like this should be managed by it. I think a fair compromise could be to include a@moonwave
tag or similar so that doc comments that shouldn't be managed by moonwave are not automatically picked up.The text was updated successfully, but these errors were encountered: