Skip to content

Bug Fix: Auto import has broken for vim-lsp #20111

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luoyancn
Copy link

@luoyancn luoyancn commented Jun 27, 2025

  1. Because of change the in 1, vim-lsp cannot complete the auto import items. May be, it`s better to use the method completion_item_edit_resolve 2 to resovle this problem. Also, maybe this change is only a workaround.

close the bug #19401

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 27, 2025
@rustbot

This comment has been minimized.

@ShoyuVanilla
Copy link
Member

I think the current implementation is not problematic in general and "reverting" #18589 is not the right fix for this.

I might be wrong because I'm not familiar with implementation details of vim-lsp but plausible solution would be one of those:

@Veykril
Copy link
Member

Veykril commented Jun 27, 2025

That seems like a bug in vim-lsp, rust-analyzer does not resolve additionalTextEdits lazily right now, so we do not consider it when declaring whether we have a resolve provider or not which is the correct behavior. Now, we probably could resolve it lazily as well, but that will only mask the bug in vim-lsp (as would adding a workaround for it like we do with neovim today, which has the same bug I believe)

@luoyancn
Copy link
Author

@ShoyuVanilla Thanks for your advise.I will try to find much better solutions.

  1. Thanks for ShoyuVanilla`s advise, I try to fix this bug by Temporarily
     disable completion resolve support like Neovim and helix.

  close the bug rust-lang#19401
@luoyancn luoyancn force-pushed the bugfix/Auto-import-has-broken-for-vim-lsp branch from 019142c to e2fed14 Compare June 30, 2025 03:22
@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants