LuaLS / LuaLS/lua-language-server

inconsistent text edits from completion

オープン
#2,688 コメント 1 件 リアクション 0 件 担当者 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

I'm writing a completion engine for neovim which uses lsp to get completions among other things
I'm in the root directory of my plugin "neocomplete"
now I get completions for `require"neo|`, want to be able to select "neocomplete" and correctly get this completed to `require"neocomplete`

### Actual Behaviour

`require"neo|` -> selecting "neocomplete" -> `require"neocompleteo`
`require"neo|"` -> selecting "neocomplete" -> `require"neocomplete"`
I checked out the completion items returned by the server and it seems it provides a different `end` range for the text edit in these cases even though in both cases it should simply replace `neo` with `neocomplete`

### Reproduction steps

See above

### Additional Notes

Tell me if I can give you any additional information from the completion results

### Log File

_No response_

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

`require"neo|` と `require"neo|"` の例を使用して NeoVim で 2 つの補完ケースを再現し、その後、補完アイテムとそれらの LSP テキスト編集範囲を調べます。`neocomplete` を選択したときに、どちらの形式でも `neo` が正しく置き換えられ、余分な文字が残らなければ修正は完了です。

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

評価

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

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

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