LuaLS / lua-language-server

A language server that offers Lua language support - programmed in Lua
https://luals.github.io
MIT License
3.38k stars 320 forks source link

怎么使用luals的文档导出功能 #2927

Open Mc-GrowlR opened 3 weeks ago

Mc-GrowlR commented 3 weeks ago

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-language-server.exe --doc="D:/lua/teast1/test.lua" --doc_out_path="D:/lua/teast1"

导出一个lua 文件的代码文档,但是,导出的确实是关于标准库 的代码文档

Actual Behaviour

导出了标准库的代码文档,例如: 图片

Reproduction steps

  1. 新建文件夹和一个示例代码文件:
    
    ---@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)