LuaLS / LuaLS/lua-language-server
Operators are not included in the output when generating documentation via the --doc CLI argument
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne am --doc CLI-Einstiegspunkt und verfolge, wie die Eingabe example.lua in doc.md und doc.json umgewandelt wird. Reproduziere das Problem mit dem bereitgestellten Vector2f-Beispiel und überprüfe anschließend, dass beide generierten Dateien die Definitionen von @operator enthalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- cli, documentation
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100