-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
@param
fails to include multiline description
#3083
Comments
seems duplicated as #2333, which the root cause seems to be |
That issue suggests that it does work in VSCode, and fails in NeoVim. Maybe this is a regression. |
Not really. ---@param foo integer
---
---Long description with multiple paragraphs, and a code example:
---
---Usage:
---```lua
---local result = x(5)
---```
---@param bar integer desc for param bar<br>this is correct new line rendering
local function x(foo, bar) end
edit: found a workaroundokay so here might be a workaround: adding a dummy ---@param foo integer #
---
---Long description with multiple paragraphs, and a code example:
---
---Usage:
---```lua
---local result = x(5)
---```
---@param bar integer desc for param bar<br>this is correct new line rendering
local function x(foo, bar) end edit2: opps... this renders fine when hovering the function, but not when hovering the param itself |
It supports all annotations of luals and includes even more advanced features. Apart from missing some diagnostics, it can share all third-party libraries and is extremely fast—I don't see what else it could be lacking. |
After your message, I took a few minutes of my life to check it again, and yes, it's still broken. It doesn't even work well. Some things work, others don't. It's not consistent, and it can't be customized as well as with LuaLS. The underlining it adds to variables is very annoying. Believe me, the speed of the EmmyLua plugin is noticeable, but it's also clear that it's not ready for production. Note: This isn't hate, it just doesn't work for me personally. Maybe it's my computer? I don't know. |
Migration indeed has some differences. Note that I have disabled return type extension fields unless they are tables. We adopt stricter standards and methods. If you wish to smooth out these differences, please raise these issues in my repository's issue tracker. |
Additionally, if a class needs to be called, it should be written with overload. I have disabled the default behavior of returning self. ---@class Event
---@overload fun(): Event
---@field onInspectItem fun(player: Player): void
Event = {}
local event = Event()
function event.onInspectItem(player)
end |
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows WSL
What is the issue affecting?
Annotations
Expected Behaviour
Attributes should be correctly parsed when they wrap over multiple lines.
Actual Behaviour
In VSCode:
Reproduction steps
Paste code above into VSCode.
Additional Notes
Surely it should be possible to write more than a single line of description for a parameter (and other tags).
Log File
No response
The text was updated successfully, but these errors were encountered: