LuaLS / LuaLS/lua-language-server
Comment block adds code oddly when new line is added
未关闭
还没有人认领这个 Issue。
- 主要语言
- 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
Nothing special happens when adding a new line to the end of a comment block.
Actual Behaviour
The end of the comment block is duplicated.
Reproduction steps
In a new X.lua file add the below as the only content.
--[[
Can teleport a player to near a target. Handles vehicles, finding valid placements and checking walkable paths based on settings.
HERE
end of comment
--]]
At the end of the word HERE add a new line by pressing enter and see the end of the comment block below it duplicated.
It produces the below.
--[[
Can teleport a player to near a target. Handles vehicles, finding valid placements and checking walkable paths based on settings.
HERE
end of comment
--]]
end of comment
--]]
Additional Notes
https://github.com/LuaLS/lua-language-server/assets/40836017/3b1e6ddc-7ac0-4184-9e25-c644b462d92e
Log File
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用包含所报告块注释的新 X.lua 文件复现 Visual Studio Code 中的补全行为,然后检查 Lua language-server 的补全路径,查找在注释块内由 Enter 触发的编辑。完成的标准是:在 HERE 后按 Enter 不再重复末尾的注释文本和 --]] 终止符。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100