LuaLS / LuaLS/lua-language-server
怎么使用luals的文档导出功能
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
### How are you using the lua-language-server?
Command Line
### Which OS are you using?
Windows
### What is the issue affecting?
Other
### Expected Behaviour
我想要通过这个命令:
``` lua
./lua-language-server.exe --doc="D:/lua/teast1/test.lua" --doc_out_path="D:/lua/teast1"
```
导出一个lua 文件的代码文档,但是,导出的确实是关于标准库 的代码文档
### Actual Behaviour
导出了标准库的代码文档,例如:

### Reproduction steps
1. 新建文件夹和一个示例代码文件:
``` lua
---@meta
---相加
---@param a integer
---@param b integer
---@return integer
function add(a, b) end
```
2. 调用命令:
```
./lua-language-server.exe --doc="D:/lua/teast1/test.lua" --doc_out_path="D:/lua/teast1"
```
3. 输出:
```
root uri = file:///d%3A/lua/teast1/test.lua
Documentation exported:4/204
D:\lua\teast1\doc.json
D:\lua\teast1\doc.md
```
### Additional Notes
导出的两个文件
[doc.md](https://github.com/user-attachments/files/17606039/doc.md)
[doc.json](https://github.com/user-attachments/files/17606040/doc.json)
### Log File
文件日志:
[file_d%3A_lua_teast1_test.lua.log](https://github.com/user-attachments/files/17606043/file_d.3A_lua_teast1_test.lua.log)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported lua-language-server.exe command against the supplied test.lua example on Windows, then compare doc.md and doc.json with the attached log. Done means the exported documentation contains the add function from test.lua rather than only standard-library entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100