LuaLS / LuaLS/lua-language-server
There are too many ways to toggle diagnostics
Nessuno ha ancora preso questa issue.
- Lingua principale
- Lua
- Stelle
- 4.4k
- Fork
- 442
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando le implementazioni e la documentazione della configurazione di Lua.diagnostics.disable, Lua.diagnostics.neededFileStatus e Lua.diagnostics.groupFileStatus. Determina l’ambito del breaking change e come i preset o le configurazioni più diffuse potrebbero sostituire le opzioni rimosse; il lavoro è completato quando viene documentato e supportato un unico percorso di configurazione coerente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- lua
- Ambito
- tooling
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100