LuaLS / LuaLS/lua-language-server

Additional blank lines are added to parameter descriptions in type annotations

Abierto
#2,333 1 comentario 8 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

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

Descripción

How are you using the lua-language-server?

NeoVim

Which OS are you using?

MacOS

What is the issue affecting?

Hover

Expected Behaviour

For multiline descriptions in @param annotations to be displayed as if they were in a single line.

Actual Behaviour

When the description in a @param annotation spans multiple lines, a linebreak in inserted in the Markdown response, which breaks syntax highlighting:
image

Even after removing the preceding whitespace in the example above, formatting is still off:
image

Reproduction steps
  1. Create a lua file with the following content:
---@param bar any This is the description
---           for bar.
local function foo(bar) end
  1. Hover over foo.
  2. Notice the broken highlighting/formatting in the description of bar.
Additional Notes

Although VS Code doesn't have additional syntax highlighting, do note how the font style in explanation above) changes, which suggests that the issue is reproducible outside Neovim:
image

Log File

No response

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

Reproduce el problema a partir del ejemplo de Lua proporcionado, pasando el cursor sobre foo en NeoVim o VS Code. Empieza por la respuesta de hover y la ruta de formato para las descripciones multilinea de @param; la tarea estará terminada cuando la descripción se renderice en una sola línea sin romper el resaltado de sintaxis de Markdown en ambos entornos indicados.

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

Evaluación

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.