You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the new version of rust-analyzer, I'm seeing an issue where selections will change right after selecting an option.
To elaborate:
I'm typing log_internal_ and it comes up with log_internal_server_error. I press to select the first option. The new text shows up. The new lsp suggestion for this location is assert_ne!. If I press Enter, Space, or any other key, the entire log_internal_server_error (which I wanted) will be overwritten with assert_ne! which is completely different from what I was typing originally.
I've upgraded from the rust-analyzer version that was out in May to 157c7d0114 2024-11-25 both of which I compiled myself. I need this new version for Rust 1.82.
This issue happens maybe 1/10 suggestions or less. I think it happens either because rust-analyzer is coming up with suggestions in places where it didn't used to, or the speed that it can come up with suggestions in some spots has greatly sped up.
If there was some delay for the user to deselect after choosing a suggestion, or if after selecting a suggestion it doesn't come up with a new selection, or if it deselects all text after choosing a suggestion, this issue would be fixed.
Reproduction Steps
I tried this:
I'm typing log_internal_ and it comes up with log_internal_server_error. I press to select the first option. The new text shows up.
I expected this to happen:
After pressing log_internal_server_error is completed and I can keep typing.
Instead, this happened:
The new lsp suggestion for this location is assert_ne!. If I press Enter, Space, or any other key, the entire log_internal_server_error (which I wanted) will be overwritten with assert_ne! which is completely different from what I was typing originally.
The only workaround I can find is to select an LSP option and hit enter extremely fast (before it can come up with a new suggestion). Sometimes I can't get the keystroke out fast enough and it happens again. It's very frustrating. You pretty much have to know the bug is coming and mentally prepare to hit enter super fast. If you overshoot, you'll just end up with a newline in your code... or you don't use lsp suggestions which sucks.
Helix log
~/.cache/helix/helix.log
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "stderr:\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "! s3-safe-proxy is running on 127.0.0.1:37701\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "info: component 'llvm-tools' for target 'x86_64-unknown-linux-gnu' is up to date\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "info: component 'rust-src' is up to date\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\u{1b}[2m2024-12-02T02:52:42.098179Z\u{1b}[0m \u{1b}[32m INFO\u{1b}[0m Rustup support is available\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "Error: configure\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "Caused by:\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 0: sync crates.io index\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 1: get crates.io index archive\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "Stack backtrace:\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 0: anyhow::kind::Adhoc::new\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 6: tokio::runtime::park::CachedParkThread::block_on\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 7: tokio::runtime::context::runtime::enter_runtime\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 8: tokio::runtime::runtime::Runtime::block_on\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 10: std::sys::backtrace::__rust_begin_short_backtrace\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 11: std::rt::lang_start::{{closure}}\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 12: std::rt::lang_start_internal\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 13: main\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 14: __libc_start_main\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 15: _start\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "Caused by:\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " command exited with status code Some(1)\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "Stack backtrace:\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 0: anyhow::error::<impl anyhow::Error>::msg\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 5: std::sys::backtrace::__rust_begin_short_backtrace\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 6: std::rt::lang_start::{{closure}}\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 7: std::rt::lang_start_internal\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 8: main\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 9: __libc_start_main\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 10: _start\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "BUILD FAILED\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "Stack backtrace:\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 0: anyhow::error::<impl anyhow::Error>::msg\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 2: std::sys::backtrace::__rust_begin_short_backtrace\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 3: std::rt::lang_start::{{closure}}\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 4: std::rt::lang_start_internal\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 5: main\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 6: __libc_start_main\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- " 7: _start\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-12-02T02:52:51.184 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-12-02T02:52:51.219 helix_term::application [WARN] unhandled window/showMessage: ShowMessageParams { typ: Error, message: "Failed to load workspaces." }
2024-12-02T03:03:31.005 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(51)), original request likely timed out
2024-12-02T03:03:31.009 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(52)), original request likely timed out
2024-12-02T03:07:48.250 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(105)), original request likely timed out
2024-12-02T03:07:48.253 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(101)), original request likely timed out
2024-12-02T03:07:48.254 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(100)), original request likely timed out
2024-12-02T03:07:48.255 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(103)), original request likely timed out
2024-12-02T03:07:48.256 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(106)), original request likely timed out
2024-12-02T03:07:48.258 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(102)), original request likely timed out
2024-12-02T03:07:49.047 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:07:49.047722393Z ERROR Position LineCol { line: 71, col: 62 } column exceeds line length 50, clamping it\n"
2024-12-02T03:07:57.672 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(149)), original request likely timed out
2024-12-02T03:08:05.842 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(160)), original request likely timed out
2024-12-02T03:08:06.549 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:08:06.549853583Z ERROR Position LineCol { line: 74, col: 62 } column exceeds line length 54, clamping it\n"
2024-12-02T03:08:21.048 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(211)), original request likely timed out
2024-12-02T03:08:21.051 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(209)), original request likely timed out
2024-12-02T03:08:21.053 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(214)), original request likely timed out
2024-12-02T03:08:21.054 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(208)), original request likely timed out
2024-12-02T03:08:21.055 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(213)), original request likely timed out
2024-12-02T03:08:21.057 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(210)), original request likely timed out
2024-12-02T03:08:21.793 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:08:21.793277269Z ERROR Position LineCol { line: 78, col: 62 } column exceeds line length 49, clamping it\n"
2024-12-02T03:08:31.302 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2024-12-02T03:09:07.399 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2024-12-02T03:09:08.566 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(296)), original request likely timed out
2024-12-02T03:09:12.975 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(305)), original request likely timed out
2024-12-02T03:09:12.977 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(304)), original request likely timed out
2024-12-02T03:09:22.272 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:09:22.272220882Z ERROR Position LineCol { line: 40, col: 42 } column exceeds line length 27, clamping it\n"
2024-12-02T03:09:43.682 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(404)), original request likely timed out
2024-12-02T03:09:43.684 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(403)), original request likely timed out
2024-12-02T03:10:13.710 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:10:13.710400196Z ERROR Position LineCol { line: 57, col: 62 } column exceeds line length 44, clamping it\n"
2024-12-02T03:11:25.768 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:11:25.768633106Z ERROR Position LineCol { line: 56, col: 69 } column exceeds line length 52, clamping it\n"
2024-12-02T03:11:29.648 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:11:29.648652834Z ERROR Position LineCol { line: 56, col: 69 } column exceeds line length 54, clamping it\n"
2024-12-02T03:11:33.259 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:11:33.259876893Z ERROR Position LineCol { line: 56, col: 69 } column exceeds line length 52, clamping it\n"
2024-12-02T03:11:36.347 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:11:36.346983617Z ERROR Position LineCol { line: 56, col: 69 } column exceeds line length 52, clamping it\n"
2024-12-02T03:11:42.189 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:11:42.189773017Z ERROR Position LineCol { line: 56, col: 69 } column exceeds line length 52, clamping it\n"
2024-12-02T03:11:47.245 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:11:47.245758989Z ERROR Position LineCol { line: 56, col: 92 } column exceeds line length 51, clamping it\n"
2024-12-02T03:12:10.626 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:12:10.626732108Z ERROR Position LineCol { line: 59, col: 69 } column exceeds line length 54, clamping it\n"
2024-12-02T03:12:14.069 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2024-12-02T03:13:23.984 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(699)), original request likely timed out
2024-12-02T03:13:23.986 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(700)), original request likely timed out
2024-12-02T03:13:23.987 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(702)), original request likely timed out
2024-12-02T03:13:23.989 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(704)), original request likely timed out
2024-12-02T03:13:23.990 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(703)), original request likely timed out
2024-12-02T03:13:23.992 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(701)), original request likely timed out
2024-12-02T03:13:43.012 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(743)), original request likely timed out
2024-12-02T03:13:43.013 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(741)), original request likely timed out
2024-12-02T03:13:43.014 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(739)), original request likely timed out
2024-12-02T03:13:43.016 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(740)), original request likely timed out
2024-12-02T03:13:43.017 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(745)), original request likely timed out
2024-12-02T03:13:43.018 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(742)), original request likely timed out
2024-12-02T03:13:43.022 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(744)), original request likely timed out
2024-12-02T03:13:43.883 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(749)), original request likely timed out
2024-12-02T03:15:31.581 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(811)), original request likely timed out
2024-12-02T03:15:31.583 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(813)), original request likely timed out
2024-12-02T03:15:31.584 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(807)), original request likely timed out
2024-12-02T03:15:31.587 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(810)), original request likely timed out
2024-12-02T03:15:31.588 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(809)), original request likely timed out
2024-12-02T03:15:31.590 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(812)), original request likely timed out
2024-12-02T03:15:32.527 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:15:32.527087304Z ERROR Position LineCol { line: 11, col: 34 } column exceeds line length 30, clamping it\n"
2024-12-02T03:16:14.157 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(840)), original request likely timed out
2024-12-02T03:16:14.158 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(844)), original request likely timed out
2024-12-02T03:16:14.160 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(841)), original request likely timed out
2024-12-02T03:16:14.161 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(843)), original request likely timed out
2024-12-02T03:16:14.162 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(839)), original request likely timed out
2024-12-02T03:16:14.163 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(847)), original request likely timed out
2024-12-02T03:16:14.164 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(842)), original request likely timed out
2024-12-02T03:16:14.168 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(845)), original request likely timed out
2024-12-02T03:16:14.890 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:16:14.890288913Z ERROR Position LineCol { line: 50, col: 80 } column exceeds line length 69, clamping it\n"
2024-12-02T03:16:28.283 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(898)), original request likely timed out
2024-12-02T03:16:29.021 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:16:29.02097115Z ERROR Position LineCol { line: 65, col: 84 } column exceeds line length 69, clamping it\n"
2024-12-02T03:16:31.811 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(912)), original request likely timed out
2024-12-02T03:16:32.458 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:16:32.457956126Z ERROR Position LineCol { line: 65, col: 84 } column exceeds line length 66, clamping it\n"
2024-12-02T03:17:17.563 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:17:17.563507313Z ERROR Position LineCol { line: 99, col: 66 } column exceeds line length 49, clamping it\n"
2024-12-02T03:17:23.221 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:17:23.221845354Z ERROR Position LineCol { line: 99, col: 66 } column exceeds line length 48, clamping it\n"
2024-12-02T03:17:27.210 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:17:27.210052182Z ERROR Position LineCol { line: 99, col: 70 } column exceeds line length 46, clamping it\n"
2024-12-02T03:17:30.415 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:17:30.41516858Z ERROR Position LineCol { line: 99, col: 74 } column exceeds line length 46, clamping it\n"
2024-12-02T03:17:40.518 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:17:40.518838261Z ERROR Position LineCol { line: 99, col: 70 } column exceeds line length 46, clamping it\n"
2024-12-02T03:21:05.516 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(1045)), original request likely timed out
2024-12-02T03:21:05.518 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(1046)), original request likely timed out
2024-12-02T03:21:06.318 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-12-02T03:21:06.31806986Z ERROR Position LineCol { line: 99, col: 66 } column exceeds line length 50, clamping it\n"
I'm only posting logs from today. Also, I had to redact a lot.
Summary
With the new version of
rust-analyzer
, I'm seeing an issue where selections will change right after selecting an option.To elaborate:
I'm typing
log_internal_
and it comes up withlog_internal_server_error
. I press to select the first option. The new text shows up. The new lsp suggestion for this location isassert_ne!
. If I press Enter, Space, or any other key, the entirelog_internal_server_error
(which I wanted) will be overwritten withassert_ne!
which is completely different from what I was typing originally.I've upgraded from the rust-analyzer version that was out in May to
157c7d0114 2024-11-25
both of which I compiled myself. I need this new version for Rust 1.82.This issue happens maybe 1/10 suggestions or less. I think it happens either because rust-analyzer is coming up with suggestions in places where it didn't used to, or the speed that it can come up with suggestions in some spots has greatly sped up.
If there was some delay for the user to deselect after choosing a suggestion, or if after selecting a suggestion it doesn't come up with a new selection, or if it deselects all text after choosing a suggestion, this issue would be fixed.
Reproduction Steps
I tried this:
I'm typing
log_internal_
and it comes up withlog_internal_server_error
. I press to select the first option. The new text shows up.I expected this to happen:
After pressing
log_internal_server_error
is completed and I can keep typing.Instead, this happened:
The new lsp suggestion for this location is
assert_ne!
. If I press Enter, Space, or any other key, the entirelog_internal_server_error
(which I wanted) will be overwritten withassert_ne!
which is completely different from what I was typing originally.The only workaround I can find is to select an LSP option and hit enter extremely fast (before it can come up with a new suggestion). Sometimes I can't get the keystroke out fast enough and it happens again. It's very frustrating. You pretty much have to know the bug is coming and mentally prepare to hit enter super fast. If you overshoot, you'll just end up with a newline in your code... or you don't use lsp suggestions which sucks.
Helix log
~/.cache/helix/helix.log
I'm only posting logs from today. Also, I had to redact a lot.
Platform
Amazon Linux 2
Terminal Emulator
Alacritty
Installation Method
cargo
Helix Version
24.7 079f544
The text was updated successfully, but these errors were encountered: