LuaLS / LuaLS/lua-language-server

Documentation export is missing information

未关闭
#2,322 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Lua
星标
4.4k
派生
442
PR 合并指标
30 天内没有已合并 PR

描述

How are you using the lua-language-server?

Command Line

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

After generating documentation with --doc, I expected to have access to the all of the information available in the annotations that is presented or used by the language server.

Actual Behaviour

There were a few things that are missing or strange:

  • @see annotations are absent.
  • Access levels (@protected, @private, @package) are absent.
  • Aliases that extend other aliases include the documentation of the alias that they extend, which makes it difficult to tell which documentation belongs to only the extended alias.
  • The start and finish fields seem odd; they're very large numbers (e.g., 5490009, 5490021) that clearly don't refer to character ranges within the files. What are these numbers?

For the purpose of generating documentation, the first two problems seem significant—it would be difficult to filter out private fields and methods, for example.

Reproduction steps
  1. Create a Lua file that uses access modifiers, @see, and an alias that extends another alias. I've provided a minimal example of such a file below.
  2. Observe the missing data and oddities.
Additional Notes

Example for reproduction:

---@class C
---@field private z integer
local C = {}

---Base alias doc comment.
---@alias Base
---| 'A'
---| 'B'

---Extended alias doc comment.
---@alias Derived
---| Base
---| 'C'

---@protected
function C.x()
end

---@see C.x
function C.y()
end
Log File

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先针对 issue 中的 Lua 复现运行 --doc 导出,并检查其输出如何表示 @see、访问修饰符、继承的别名文档以及 start/finish。跟踪文档导出的入口点,并将其输出与 language server 使用的注解信息进行比较。当导出的数据保留所请求的注解细节,并解释或修正范围值时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
lua
领域
documentation, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。