lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

Collapsing of functions in the editor breaks if there is a comment before and after the function declaration

Open emmericp opened this issue 1 year ago • 0 comments

VSCode with sumneko.lua 3.7.4

Reproducer:

-- foo
function foo() -- foo
	if a then
		return a
	end
end

This code shows two collapsing/folding indicators to the left, one for the if (expected) and one for the comment (unexpected), but none for the function itself:

Screenshot 2024-03-24 152122

Clicking the first folding icon results in this:

Screenshot 2024-03-24 152938

It looks like it thinks the two comments belong to one comment block for the function instead of being unrelated comments.

emmericp avatar Mar 24 '24 14:03 emmericp