LuaLS / LuaLS/lua-language-server
Irritating Markdown syntax for headings conflicts with traditional comment frames in Lua
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Annotations
Expected Behaviour
"Hello World!" in the following annotation is NOT treated as a heading:
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Actual Behaviour
"Hello World!" shows as a heading in the documentation pop-up window like so.
Reproduction steps
Type the following code and hover your mouse over the function name.
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Additional Notes
As someone who likes to frame documentation comments, I find this issue unbearable. The reason we should except Markdown's dash ---- syntax for headings in LuaCATS is because Lua uses dashes to delimit the comments themselves. And those who frame comments also use the same character (dash) for the rest of the frame. You wouldn't use another character for the frame, it would look ugly and not uniform. For example, in C, Markdown's heading syntax does not conflict with the comment delimiter (//). So you can frame your comments by repeating the comment delimiter itself for a uniform frame.
Log File
Log files have no use in this issue.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 Visual Studio Code 扩展中,将鼠标悬停在报告中显示的带框 Lua 注解中的函数上,以复现该问题。首先定位用于注解文档的 LuaCATS Markdown 标题处理,然后验证带框的“Hello World!”文本不再呈现为标题,而普通 Markdown 标题仍然有效。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- documentation
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100