mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: Insert whitespace into trait-impl completions when coming from macros
This commit is contained in:
parent
6f006b7524
commit
86d1d9067e
6 changed files with 99 additions and 83 deletions
|
@ -114,6 +114,10 @@ pub fn insert_ws_into(syn: SyntaxNode) -> SyntaxNode {
|
|||
ted::insert(pos, insert);
|
||||
}
|
||||
|
||||
if let Some(it) = syn.last_token().filter(|it| it.kind() == SyntaxKind::WHITESPACE) {
|
||||
ted::remove(it);
|
||||
}
|
||||
|
||||
syn
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue