LuaLS / LuaLS/lua-language-server

Mass renaming proposal

Aperta
#1,404 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

suggestion
Lingua principale
Lua
Stelle
4.4k
Fork
442
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

There are a number of settings, diagnostics, and more that have unclear names that I think can be improved. This issue serves to propose new names for these items so that they can all be tracked in one place and implemented at once to minimize the number of breaking releases that would need to be released.

## Settings
- [ ] `completion.displayContext` -> `completion.peekDefinition`
- There is already a `Peek Definition` command in VS Code that has a similar function and I think naming it the same will help people understand its function without confusing the two as they are triggered entirely differently.
- [ ] `diagnostics.disable` -> [**REMOVE**](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.groupFileStatus` -> [**REMOVE**](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.groupSeverity` -> [**REMOVE**](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.ignoreFiles` -> `diagnostics.diagnoseIgnored`
- [ ] `diagnostics.libraryFiles` -> `diagnostics.diagnoseLibraries`
- [ ] `diagnostics.neededFileStatus` -> `diagnostics.config` [(Rework functionality)](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.severity` [(Rework functionality)](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.workspaceDelay` -> `diagnostics.delay`
- [ ] `hint.setType` -> `hint.assignType`
- [ ] `hover.enumsLimit` -> `hover.typesLimit`
- [ ] `hover.previewFields` -> `hover.peekFields`
- [ ] `runtime.special` -> `runtime.aliases`
- [ ] `workspace.checkThirdParty` -> [`workspace.checkEnvConfigs`](https://github.com/sumneko/lua-language-server/issues/1384)
- [ ] `workspace.ignoreDir` -> `workspace.ignore`
- [ ] `workspace.library` -> `workspace.libraries`
- [ ] `workspace.maxPreload` -> `workspace.maxFiles`
- [ ] `workspace.preloadFileSize` -> `workspace.maxFileSize`
- [ ] `workspace.userThirdParty` -> [`workspace.envConfig`](https://github.com/sumneko/lua-language-server/issues/1384)

## Diagnostics
I imagine there is a good reason `abiguity-1` is named how it is 😄 I see they all have at least 1 hyphen so I guess that is a limitation with how they are parsed?

- [ ] `unknown-diag-code` -> `unknown-diagnostic`
- [ ] `cast-local-type` -> `local-cast-mismatch`

## Syntax Errors
Luckily these can probably be changed with very little impact on the user and most people likely would not have any settings related to these.
- [ ] `err-assign-as-eq` -> `assign-with-equals`
- [ ] `err-c-long-comment` -> `multiline-comment-prefix`
- [ ] `err-comment-prefix` -> `comment-prefix`
- [ ] `err-do-as-then` -> `then-as-do`
- [ ] `err-eq-as-assign` -> `equality-with-assign`
- [ ] `err-esc` -> `unknown-escape`
- [ ] `err-nonstandard-symbol` -> `non-standard-symbol`
- [ ] `err-then-as-do` -> `do-as-then`
- [ ] `exp-in-action` -> `unexpected-expression`
- [ ] `keyword` -> `reserved`
- [ ] `miss-esc-x` -> `miss-hex-value`
- [ ] `miss-exp` -> `miss-expression`

`newfield-call` and `newline-call` are not easy to understand but I can't think of anything that does a better job 🤔

~~I don't even know what these do: `unexpect-efunc-name`, `unexpect-lfunc-name`~~

---

Please let me know what you think and feel free to suggest other names.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando le impostazioni, i codici diagnostici e le rinominazioni degli errori di sintassi proposti in questa issue, insieme alle issue collegate #1364 e #1384. Determina innanzitutto quali nomi e quali modifiche alle funzionalità siano accettati; per considerare il lavoro completato sarebbe necessario un piano di ridenominazione completo e concordato, non una modifica isolata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
lua
Ambito
devtools
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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.