LuaLS / LuaLS/lua-language-server

Mass renaming proposal

Abierto
#1,404 10 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

suggestion
Lenguaje dominante
Lua
Estrellas
4.4k
Forks
442
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza revisando los ajustes, códigos de diagnóstico y cambios de nombre de errores de sintaxis propuestos en este issue, junto con los issues vinculados #1364 y #1384. Determina primero qué nombres y cambios de funcionalidad se aceptan; para darlo por terminado se requeriría un plan de renombrado completo y acordado, no una modificación aislada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
lua
Área
devtools
Tipo de issue
Refactorización
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.