-
Notifications
You must be signed in to change notification settings - Fork 39
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
Preserve comments preceding global declarations #126
Comments
added option ---@param a any
---@param b any
---@param c any
f = (a, b, c)-> But not sure if this works for the Lua LSP functions. |
I have custom script that use yue module to compile to lua. Can you make 'reserve_comment' support in yue module! Thanks and regards! |
'reserve_comment' was added in module. Should be available as local yue = require("yue")
print yue.to_lua([[
-- a comment
f = ->
]], {reserve_comment = true}) |
Shouldn't it be |
"preserve" and "reserve" both have the meaning of keeping something, while "reserve" is just for keeping something for future use, the "preserve" word has more meaning of keeping something from harm (protect). So I think using the "reserve" word could be better. |
Existing issues, such as #58 and #57, have requested support for static type annotations. A less extreme solution would be to preserve comments containing Sumneko's annotations for use with their Lua language server. This way, the resulting Lua code will be identical but still support type-checking. It could also improve interoperability with other documentation generators.
The Yuescript tool could expose an option to preserve comments directly before global declarations, e.g. those displayed by
yue -g
The text was updated successfully, but these errors were encountered: