LuaLS / LuaLS/lua-language-server
Collapsing of functions in the editor breaks if there is a comment before and after the function declaration
未關閉
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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:
Clicking the first folding icon results in this:
It looks like it thinks the two comments belong to one comment block for the function instead of being unrelated comments.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,使用提供的 Lua 範例在 VSCode 中重現摺疊行為,並比較註解、函式和 if 區塊周圍的指示器。完成的標準是註解保持分離,函式取得預期的摺疊指示器,同時不破壞 if 區塊的摺疊行為。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua, vscode
- 領域
- tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100