LuaLS / LuaLS/lua-language-server
There are too many ways to toggle diagnostics
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 442
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Why is there 3 different ways to disable diagnostics?
The Problem
Currently, there is:
Lua.diagnostics.disable- An array of strings where you specify each diagnostic to disable
- Simple, but has no control for open/closed files
Lua.diagnostics.neededFileStatus- An object where the
keyis the name of the diagnostic and thevalueis how the diagnostic will be checked (not at all, only open files, all files) - Slow but precise, allows you to alter the most diagnostics but can be slow to get everything set up the way you like it. Good for long-term setup where you can get set up perfectly.
- An object where the
Lua.diagnostics.groupFileStatus- An object where the
keyis the name of the group and thevalueis how the group of diagnostics will be checked (not at all, only open files, all files) - Quick but not precise, allows the user to quickly turn off entire categories of diagnostics but does not allow for disabling individual diagnostics. Good for short-term setup.
- An object where the
This can get very confusing very quickly.
The solution
I think going with just Lua.diagnostics.neededFileStatus would make the most sense.
It allows for the user to completely customize how the server runs, which is more important than the user quickly being able to get things working sort of how they like it in the short-term.
To still help get users up and running as fast as possible, we can offer "presets" or "popular configs" on the discussions page. This can help satisfy those that want just the basics or full strict mode.
This would definitely be a breaking change but I think it is a very important one to make!
Originally posted by @carsakiller in https://github.com/sumneko/lua-language-server/discussions/1362#discussioncomment-3194851
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Lua.diagnostics.disable、Lua.diagnostics.neededFileStatus、Lua.diagnostics.groupFileStatus の実装と設定ドキュメントを探します。breaking change の範囲と、プリセットや一般的な設定で削除されたオプションをどのように置き換えられるかを確認します。一貫した 1 つの設定方法がドキュメント化され、サポートされた時点で作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- tooling
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100