LuaLS / LuaLS/lua-language-server

Disable snippets via `capabilities`?

未关闭
#3,000 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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
  1. Set capabilities.textDocument.completion.completionItem.snippetSupport = false
  2. Start typing i... or fo..
  3. Snippets will be shown for if and for.
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

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先,在 capabilities.textDocument.completion.completionItem.snippetSupport = false 的情况下,在 NeoVim 中复现 iffor 的补全,然后跟踪语言服务器的补全处理流程。完成的标准是服务器遵守该 capability,在它被禁用时停止发送 snippets,且不依赖单独的 completion.callSnippetcompletion.keywordSnippet 设置。

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

评估

技术栈
lua, macos, neovim
领域
devtools
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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