LuaLS / LuaLS/lua-language-server
Disable snippets via `capabilities`?
还没有人认领这个 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?
Completion
Expected Behaviour
According to the LSP spec, clients should be able to disable support for snippets by setting capabilities.textDocument.completion.completionItem.snippetSupport = false. However, lua-language-server seems to ignore this setting in favor of its own (non-standard?) settings (completion.callSnippet = "Disable" and completion.keywordSnippet = "Disable".
Actual Behaviour
Even if a user sets capabilities.textDocument.completion.completionItem.snippetSupport = false, snippets continue to be sent by the language server.
Reproduction steps
- Set
capabilities.textDocument.completion.completionItem.snippetSupport = false - Start typing
i...orfo.. - Snippets will be shown for
ifandfor.
Additional Notes
Since it seems standard to disable snippets using the capabilities setting, I'm hoping that lua-language-server can support that.
Log File
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 capabilities.textDocument.completion.completionItem.snippetSupport = false 的情况下,在 NeoVim 中复现 if 和 for 的补全,然后跟踪语言服务器的补全处理流程。完成的标准是服务器遵守该 capability,在它被禁用时停止发送 snippets,且不依赖单独的 completion.callSnippet 或 completion.keywordSnippet 设置。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua, macos, neovim
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100