LuaLS / LuaLS/lua-language-server

Operators are not included in the output when generating documentation via the --doc CLI argument

Abierto
#3,194 1 comentario 0 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?

Command Line

Which OS are you using?

Linux

What is the issue affecting?

Annotations, Other

Expected Behaviour

When generating markdown and JSON documentation via the command line argument --doc, the output files should contain operators defined by the @operator syntax.

Actual Behaviour

The expected behavior is that the operators are missing in both the markdown and JSON generated files.

Reproduction steps

Given the following Lua file:

---@meta

---@class Vector2f
---@operator unm:Vector2f
---@operator add(Vector2f | number):Vector2f
---@operator sub(Vector2f | number):Vector2f
Vector2f = {}

When the language server is run with the following args:

./LuaS/bin/lua-language-server --doc=./example.lua --doc_out_path=.

Then the output doc.md and doc.json do not contain any of the operators specified.

In the doc.json the type Vector2d is the following, notice the lack of any operators:

{
    "defines": [
        {
            "async": false,
            "deprecated": false,
            "file": ".",
            "finish": [
                2,
                18
            ],
            "start": [
                2,
                10
            ],
            "type": "doc.class",
            "view": "Vector2f",
            "visible": "public"
        }
    ],
    "fields": [],
    "name": "Vector2f",
    "type": "type",
    "view": "Vector2f"
}
Additional Notes

No response

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

Comienza en el punto de entrada de CLI --doc y sigue cómo la entrada example.lua se convierte en doc.md y doc.json. Reproduce el problema con el ejemplo de Vector2f proporcionado y, después, verifica que ambos archivos generados incluyan las definiciones de @operator.

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

Evaluación

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.