LuaLS / LuaLS/lua-language-server
(feature)refactor: convert between ternary and if/else
未關閉
還沒有人認領這個 Issue。
enhancement
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
it would be really cool if there would be a code action (available when inside one of the two) that allows to change between ternary assignments and if/else statements
example:
```lua
if y then
x = 3
else
x = 4
```
```lua
x = y and 3 or 4
```
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
未指定任何檔案、測試或進入點。首先定位 language server 對 code action 的處理,以及 Lua 三元風格指定和 if/else 陳述式的語法分析;完成標準是 code action 在任一形式下都能運作,並能在兩個範例之間相互轉換。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- devtools
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100