lua-language-server
lua-language-server copied to clipboard
Incorrect folding range when a function with an inline comment follows an annotation
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Formatting
Expected Behaviour
The folding chevron will be next to the function declaration and will fold the function.
Actual Behaviour
The folding chevron is next to the annotation and will only fold the one line of the function, leaving the rest of the function unfolded.
Reproduction steps
This code reproduces it:
---@param bar integer function foo(bar) -- comment local whee = bar + 3 return whee end
Additional Notes
Removing the inline comment fixes it. Putting a blank line between the annotation and the function declaration line, even if it still has the inline comment, fixes it.
Log File
I couldn't get the thing to upload it, I'm sorry :(