Omni completion duplicate prefix
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- vim
- Domínio
- tooling
Direção de pesquisa
Comece pela função de conclusão omni do plugin, especialmente pelo caminho findstart=1, e reproduza o problema com um arquivo .res vazio e a entrada Js.Un. Compare o comportamento da conclusão com a configuração omni sugerida e verifique se selecionar Undefined deixa Js.Undefined em vez de duplicar o prefixo; a issue também identifica o binário de análise como um possível ponto de integração.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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?
- Linguagem predominante
- Vim Script
- Estrelas
- 164
- Forks
- 17
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de rescript-lang/vim-rescript
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Add errorformat Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
rescript-lang/vim-rescript#74 · 1 comentário ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
rescript-lang/vim-rescript#67 · 1 comentário ·
-
Create interface files Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 30/100
rescript-lang/vim-rescript#66 · 1 comentário ·
-
Incorrect resource paths Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 55/100
Todas as issues de rescript-lang/vim-rescript
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
use-agent-os/agent-os#3314 ·
-
documentation low-priority templates
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
danielmiessler/LifeOS#2218 ·
-
in-progress proposal
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
uibcdf/molsyssuite#36 ·