Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion mess with existing code #431

Closed
pengux opened this issue Jul 13, 2019 · 14 comments
Closed

Completion mess with existing code #431

pengux opened this issue Jul 13, 2019 · 14 comments

Comments

@pengux
Copy link

pengux commented Jul 13, 2019

Referring to issue prabirshrestha/asyncomplete.vim#127, upon completion it deletes existing code. Setting let g:lsp_text_edit_enabled = 0 fixes this behavior.

@0xBADDCAFE
Copy link

This issue targets like the behavior?

  1. ce on normal mode to go to insert mode with erase part of word
  2. <C-n> to select completion that longer than original word.
  3. <Esc> and wait to dismiss popup
  4. Completion deletes trailing code ( ( before resp.Body is deleted in below gif)

rec_20191028_100458

VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 29 2019 22:27:49)
Included patches: 1-2102
OS: Arch Linux (on WSL)
LSP Engine: golang.org/x/tools/gopls v0.1.7 (go version go1.13.3 linux/amd64)

@mnishz
Copy link

mnishz commented Nov 6, 2019

I think I got the same behavior. I'll also change g:lsp_text_edit_enabled for tentative fix. Thank you.

@mattn
Copy link
Collaborator

mattn commented Dec 20, 2019

did you solve this issue?

@0xBADDCAFE
Copy link

Setting let g:lsp_text_edit_enabled = 0 prevent this, but still causes when let g:lsp_text_edit_enabled = 1 .
#597 explains further, so I think that can close this issue and continue discussion in #597 .

@mattn
Copy link
Collaborator

mattn commented Dec 24, 2019

Updated textEdit behavior in recent changes. Could you please try this again?

@mnishz
Copy link

mnishz commented Dec 24, 2019

The same issue was recreated with the latest one (ed1c263) and let g:lsp_text_edit_enabled = 1.

@0xBADDCAFE
Copy link

Still causes with ed1c263 and let g:lsp_text_edit_enabled = 1 (on above environment) too.

@prabirshrestha
Copy link
Owner

Can you try the latest master again. else please provide a hello world repository with repo.

@prabirshrestha
Copy link
Owner

Also if anyone has a minimal repository with the repo that would be good.

@0xBADDCAFE
Copy link

hello world repository with repo.

I'll try it so please just a time (few day).

@hrsh7th
Copy link
Collaborator

hrsh7th commented Dec 28, 2019

@0xBADDCAFE
Could you try #637?
I re-implement CompleteDone behavior.

@0xBADDCAFE
Copy link

0xBADDCAFE commented Dec 29, 2019

I tried #637 and it seems to be fixed this issue.

@hrsh7th hrsh7th mentioned this issue Dec 29, 2019
11 tasks
@mnishz
Copy link

mnishz commented Dec 29, 2019

#637 worked on my machine as well.

@prabirshrestha
Copy link
Owner

PR has been merged. Please try latest master. Thanks to those who tired and bit shoutout to @hrsh7th for the actual fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants