LuaLS / LuaLS/lua-language-server

Disable snippets via `capabilities`?

オープン
#3,000 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、capabilities.textDocument.completion.completionItem.snippetSupport = false の状態で NeoVim の iffor の補完を再現し、次に language server の補完処理を追跡します。完了の条件は、server がその capability を尊重し、無効化されている場合に snippet の送信を停止することです。その際、個別の設定 completion.callSnippetcompletion.keywordSnippet に依存してはいけません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua, macos, neovim
領域
devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。