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

Goto autocompletion doesn't respect Editor: Insert Spaces setting

Open C3pa opened this issue 1 year ago • 4 comments

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?

Completion

Expected Behaviour

As can be seen in the images below, the autocompletion of goto continue will indent the ::continue:: line with four spaces, while my settings have Editor: insert spaces unchecked, which means it should insert a tab character instead.

Actual Behaviour

Note: in these images, the tab character is rendered as an arrow, while spaces are rendered as dots. Image 1 image Image 2 image image

Reproduction steps

  1. In VSCode, set your Editor: Insert Spaces setting to false
  2. Try the following code:
local arr = {}

for k,v in pairs(arr) do
	if type(k) == "string" then
		goto continue
	end
    ::continue::
end
  1. When you start typing goto continue, and select the popup, you'll get the four spaces indentation instead of tab on the ::continue:: line.

C3pa avatar Mar 29 '23 11:03 C3pa

I don't know the indentation in this request, maybe I should open an issue to upstream

sumneko avatar Mar 29 '23 11:03 sumneko

Where is that, the VSCode repo?

C3pa avatar Mar 29 '23 11:03 C3pa

LSP

sumneko avatar Mar 29 '23 11:03 sumneko

@sumneko Have you opened an issue upstream?

C3pa avatar Feb 25 '24 10:02 C3pa