Omni completion duplicate prefix
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- vim
- 領域
- tooling
調査の方向性
プラグインの omni-completion 関数、特に findstart=1 のパスから始め、空の .res ファイルと入力 Js.Un で問題を再現してください。補完の動作を提案された omni 設定と比較し、Undefined を選択したときにプレフィックスが重複せず Js.Undefined が残ることを確認してください。また、この issue では分析バイナリが統合ポイントの候補として特定されています。
索引モデルが issue の本文から書いたものです。
説明
When I select an entry from the omni completion menu, the existing prefix is duplicated. I'm using the latest vim-rescript and the suggested omni completion configuration (without coc-vim).
The problem can be demonstrated (once issue #56 has been fixed) by first creating an empty .res file, compiling the project, opening the file in VIM or Neovim and then typing out the following:
Js.Un
Hit <C-x><C-o> in insert mode with the cursor at the end of the line. The only match (Undefined) will be selected as expected. Afterwards the buffer will look like this:
Js.UnUndefined
The plugin most probably shouldn't end up duplicating the common prefix.
It looks like VS Code does the right thing by default and "will replace the word until the cursor with the given label or insertText" in cases like this:
https://code.visualstudio.com/api/references/vscode-api#CompletionItem
This might be a bit problematic to fix client side, because it looks like the plugin must know the correct location when the completion function is first called (when findstart is set to 1). Could the bulk of the logic be moved there so that the second invocation would just return the already-populated list?
Or could the analysis binary be amended to include insertText?
- 主要言語
- Vim Script
- スター
- 164
- フォーク
- 17
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rescript-lang/vim-rescript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Add errorformat オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
rescript-lang/vim-rescript#74 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
rescript-lang/vim-rescript#67 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
rescript-lang/vim-rescript#66 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
rescript-lang/vim-rescript の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
newrelic-experimental/preflight#793 · コメント 1 件 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
caddyserver/caddy#8046 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zilliztech/memsearch#759 ·
-
comp/cron P2 sweeper:risk-automation type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#117792 · コメント 1 件 ·