LuaLS / LuaLS/lua-language-server
Goto autocompletion doesn't respect Editor: Insert Spaces setting
未关闭
还没有人认领这个 Issue。
enhancement
upstream
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
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 2 

Reproduction steps
- In VSCode, set your Editor: Insert Spaces setting to false
- Try the following code:
local arr = {}
for k,v in pairs(arr) do
if type(k) == "string" then
goto continue
end
::continue::
end
- When you start typing goto continue, and select the popup, you'll get the four spaces indentation instead of tab on the
::continue::line.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在禁用 Editor: Insert Spaces 并使用所示 Lua 代码片段的情况下,复现 VS Code 扩展中的 goto 补全行为,然后跟踪补全路径。当 Editor: Insert Spaces 被禁用时,选择 goto continue 会使用制表符而不是空格缩进标签,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua, vscode
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100