LuaLS / LuaLS/lua-language-server
wrong document SymbolKind?
未关闭
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
How are you using the lua-language-server?
NeoVim
Which OS are you using?
MacOS
What is the issue affecting?
Annotations
Expected Behaviour
correct document symbol kinds as per https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#symbolKind
such as
- function parameter (
function(opts) end)opts:Variable if: no symbol kind
Actual Behaviour
seemingly wrong symbol kinds
such as
opts:Constantif:Package
Reproduction steps
- create
example.luafile
local function config(opts)
if opts then
print('hello world')
end
end
- inspect LSP document symbols (I used
:Telescope lsp_document_symbols) - notice wrong types for
optsandif
Additional Notes
No response
Log File
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 example.lua 中使用 :Telescope lsp_document_symbols 复现该问题,然后跟踪语言服务器生成文档符号的过程,以及其到 LSP 3.17 SymbolKind 值的映射。完成标准是 opts 被报告为 Variable,且 if 语句被省略,而不是被报告为 Package。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100