LuaLS / LuaLS/lua-language-server
FR: Option that "Ignore this line" Code Actions adds to this line instead of the one above
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Right now, when using the "Ignore this line" code action, it adds this line above the respective line:
```lua
---@diagnostic disable-next-line: rulename
problemline
```
However, I often prefer this type of line ignoring
```lua
problemline ---@diagnostic disable-line: rulename
```
while it works and is correctly recognized by the lsp, there is no code action and/or no option to add such a comment, I have to change this manually.
---
The eslint-lsp, for example, [has an option for the ignore-line-code-action which accepts `sameLine` or `separateLine`](https://github.com/microsoft/vscode-eslint/blob/55871979d7af184bf09af491b6ea35ebd56822cf/server/src/eslintServer.ts#L2119).
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先找出「Ignore this line」程式碼動作的 language server 實作,以及其設定的定義方式。比較現有的 disable-next-line 行為與所要求的同一行 disable-line 形式;完成條件是使用者可以透過選項選擇放置位置,且產生的 Lua 註解能正確被辨識。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- devtools
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100