LuaLS / LuaLS/lua-language-server
Operators are not included in the output when generating documentation via the --doc CLI argument
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### 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_
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 `--doc` CLI 入口開始,追蹤 example.lua 輸入如何轉換為 `doc.md` 和 `doc.json`。使用提供的 Vector2f 範例重現該問題,然後確認產生的兩個檔案都包含 `@operator` 定義。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- cli, documentation
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100