fix: Insert whitespace into trait-impl completions when coming from macros

This commit is contained in:
Lukas Wirth 2022-05-24 22:33:42 +02:00
parent 6f006b7524
commit 86d1d9067e
6 changed files with 99 additions and 83 deletions

View file

@ -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
}