LuaLS / LuaLS/lua-language-server

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

Aperta
#3,194 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Lua
Stelle
4.4k
Fork
442
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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:

```lua
---@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:

```json
{
"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_

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dal punto di ingresso CLI `--doc` e traccia il modo in cui l’input example.lua viene convertito in `doc.md` e `doc.json`. Riproduci il problema con l’esempio Vector2f fornito, quindi verifica che entrambi i file generati includano le definizioni `@operator`.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
lua
Ambito
cli, documentation
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.