-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 items change when cycling #12119
Comments
Huh, I don't know what is going on. I am experiencing the same behavior on older, known good commits now. Even downloaded the GitHub release binary and same thing. It was just fine earlier today and I haven't updated any of my setup in the meantime. I can only continue to debug but if anyone has seen this behavior before please tell. |
closing as this is some kind of setup issue I have |
I also have this issue when building from source, which didn't happen previously. I think it's worth reopening the issue. |
It is probably related to this issue rust-lang/rust-analyzer#18536 as rust-analyzer seems to have changed its behaviour on recent nightly to be more compliant to the LSP standard. |
According to @tgross35 in rust-lang/rust-analyzer#18547 rust-analyzer's interactions with helix in producing completions seems buggy. Yes, initially this was thought to be a rust-analyzer issue. According to @flodiebold in rust-lang/rust-analyzer#18503 (comment) this may be a Helix issue:
To copy the repro steps from tgross35's issue:
|
the issues that helix and nvim have are entirely orthogonal but manifest in the same way. Nvim modifies the document while previewing completions. Helix intentionally uses virtual transactions that are not propagated to the LS when previewing a completion. However, helix does not support incomplete completion requests so we only requst completions once and as the user continues to type the document does ofcourse change. What RA does is probably ok when using incomplete completion requests (we just don't do that yet) but the assumption that the document that a completion is resolved for is identical to the one a completion was requested for is probably not generallly valid for LSP as it's impossible to fullfill for servers without incomplete completion requests. I had a branch for incomplete completion requests at some point that I will try to dust off at somepoint (but not sure I will manage before christmas) so the RA case will be addressed eventually but I am not sure this is really generally spec compliant |
Is this related to microsoft/TypeScript#60606 ? |
Sorry, I'm not adding anything valuable to this issue with this comment, but it really says something about how much I've grown to like helix, when this bug prevents me from using it effectively and I find that having to use vim/zed as a workaround is so jarring. |
@gustafla Imho the workaround should not be to use another editor but an earlier version of rust-analyzer, e.g. try a stable version from Oct. or early Nov. |
Rust-Analyzer blacklisted helix from this specific feature so RA and helix work together for now. I do have incomplete completion requests almost working: rust-lang/rust-analyzer#18547 (comment) but I don't think what RA is doing here is really spec compliant and after some prodding I was able to reproduce the same issue in vscode. It only works there in most because the request handler is usually fast-enough (aka relying on a race condition) |
The newer versions have a faulty rust-analyzer which does not work well with the Helix editor. The auto completion sometimes changes while cycling through them. We need to wait until this is fixed either here helix-editor/helix#12119 or here rust-lang/rust-analyzer#18547
The newer versions have a faulty rust-analyzer which does not work well with the Helix editor. The auto completion sometimes changes while cycling through them. We need to wait until this is fixed either here helix-editor/helix#12119 or here rust-lang/rust-analyzer#18547
This was fixed in rust-lang/rust-analyzer#18653. |
Summary
After building from source to the latest master(cbbeca6), I noticed the completion items change when cycling through them. The names are initially what is expected, but the actual insertion in not. And then when cycling, the name changes to match what gets inserted.
Reproduction Steps
Helix log
Logs are pretty noisy so tried to isolate a part of when the completion items were being cycled.
~/.cache/helix/helix.log
Platform
Windows
Terminal Emulator
wezterm 20241112-222331-ed7ec94c
Installation Method
source
Helix Version
helix 24.7 (cbbeca6)
The text was updated successfully, but these errors were encountered: