-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Hi,
I am not a rust developer or a active rust-analyzer user but I work on a lsp client (Kate editor) and we got this bug report: https://bugs.kde.org/show_bug.cgi?id=452047
Consider the following simple rust code:
fn main() {
|println!("hello");
}
|
indicates caret position. If you have "Format on Type" enabled and ou press backspace enought times so that the lines wraps into the previous line and touches the {
of the previous line, rust-analzyer suggests to add a bracket at the end of line resulting in
fn main() {|println!("hello");}
}
This led to an infinite loop in Kate (which has been fixed), but still it doesn't seem right that the LSP suggests to a bracket in that place.
rust-analyzer version: rust-analyzer bc08b8e 2022-03-28 stable
rustc version: rustc 1.51.0 (2fd73fabe 2021-03-23)
Metadata
Metadata
Assignees
Labels
No labels