LuaLS / LuaLS/lua-language-server

Mass renaming proposal

Ouverte
#1,404 10 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

suggestion
Langage dominant
Lua
Étoiles
4.4k
Forks
442
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par examiner les paramètres, les codes de diagnostic et les renommages d’erreurs de syntaxe proposés dans cette issue, ainsi que les issues liées #1364 et #1384. Déterminez d’abord quels noms et changements de fonctionnalité sont acceptés ; pour considérer la tâche comme terminée, il faudrait un plan de renommage complet et approuvé, plutôt qu’une modification isolée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
lua
Domaine
devtools
Type d'issue
Refactorisation
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.