Skip to content
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

whitespace handling in function type signature #48

Closed
mfussenegger opened this issue Oct 9, 2022 · 1 comment · Fixed by #47
Closed

whitespace handling in function type signature #48

mfussenegger opened this issue Oct 9, 2022 · 1 comment · Fixed by #47

Comments

@mfussenegger
Copy link

mfussenegger commented Oct 9, 2022

lua-language-server allows to define the type for functions like fun(PARAM: TYPE): RETURN_TYPE

It appears that lemmy-help currently stops at the first whitespace.

In something like this:

---@alias TestRunner fun(classname: string, methodname: string):string, string[]

It only renders:

     Type: ~
         fun(classname:

Without whitespace it works:

---@alias TestRunner fun(classname:string,methodname:string):(string,string[])

Would be nice if the variant with whitespaces worked too.

Update: I just noticed #47, so this is already getting addressed?

@numToStr
Copy link
Owner

numToStr commented Oct 9, 2022

Yup, most types will be parsed correctly after #47. Although after seeing your example I might also need to handle multiple returns 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants