LuaLS / LuaLS/vscode-lua

Fix Indent affecting lines incorrectly

Abierto
#169 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
TypeScript
Estrellas
215
Forks
62
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Which OS are you using?

Windows

Expected Behaviour

Writing local ret = Button:new(text, x, y) and then putting in a new line before text, to change the arguments to a vertical list, un-indents at text. That is, the result is

Button:new(
text, x, y)
Actual Behaviour

The result should be

Button:new(
    text, x, y)
Reproduction steps
  • Write a function with an argument
  • Break before the argument
Additional Notes

The behaviour is as expected if Fix Indent is off. However I believe the point is for other cases like strings, to get

"I went to a function
the other day"

and not

"I went to a function
    the other day"

I'm not exactly sure what the point of the option is. I assume it doesn't apply to every time vscode indents code, but I think the set it's supposed to apply to probably shouldn't apply to the function(arg) case.

Log

No response

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

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

Comienza reproduciendo el comportamiento reportado en la VSCode Lua extension con Fix Indent habilitado: haz un salto de línea antes de un argumento en una llamada a una función de Lua y compáralo con un string multilínea. Sigue el punto de entrada del manejo de la indentación y añade cobertura para ambos casos; se considera terminado cuando los argumentos siguen indentados, mientras que la continuación del string no se indenta incorrectamente.

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

Evaluación

Stack tecnológico
lua, typescript
Área
tooling
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.