-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Summary
I can not rename a enum which has a certain derive macro, here thiserror::Error, via LSP Server in Rust.
I do not get even to the renaming prompt. Instead I get an error message protocol error: InvalidParams: No references found at position.
This problems seems to be helix and not rust analyzer because vscodium does not have the problem on my system.
This problems disappears when I remove the derive macro called thiserror::Error in the derive derective of the enum.
Reproduction Steps
Content of rust file producing this error
use std::io;
use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum NonExistinDirectory {
#[error(
"Could not determine meta data at {path:?} to determine if this is a directory. Error: {error}"
)]
Io { path: PathBuf, error: io::Error },
#[error("There is no directory at {0:?}")]
NotThere(PathBuf),
}
fn main() {
println!("Hello, world!");
}
I tried this:
- Create a project via
cargo new hello. - Go into
cd hello. - Add thiserror crate to the project
cargo add thiserror. - Paste the above mentioned content to
src/main.rs. hx src/main.rswithin the diretory of the rust project.- Move cursor to name of enum Name
NonExistinDirectory. - Press
Space + rto rename the name of this enum.
I expected this to happen:
Prompt in the bottom to change the name of the enum.
Instead, this happened:
Got the following error where the prompt for renaming should be.
protocol error: InvalidParams: No references found at position
Helix log
~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines
Platform
Linux Fedora 43
Terminal Emulator
alacritty
Installation Method
DNF: Native Package Manager
Helix Version
helix 25.07.1 (a05c151)