Omni completion duplicate prefix
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- vim
- 领域
- tooling
调研方向
从插件的 omni 补全函数开始,尤其是 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 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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
-
难度 2/5 1-3 小时 新手友好度 88/100
use-agent-os/agent-os#3314 ·
-
documentation low-priority templates
难度 2/5 1-3 小时 新手友好度 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 90/100
danielmiessler/LifeOS#2218 ·
-
in-progress proposal
难度 1/5 1 小时以内 新手友好度 88/100
uibcdf/molsyssuite#36 ·