complete raw identifier with "r#" prefix

This commit is contained in:
Hongxu Xu 2022-06-26 14:45:30 +08:00
parent 5bb123d970
commit f536766efb
12 changed files with 304 additions and 60 deletions

View file

@ -24,9 +24,9 @@ pub(crate) fn render_record_lit(
) -> RenderedLiteral {
let completions = fields.iter().enumerate().format_with(", ", |(idx, field), f| {
if snippet_cap.is_some() {
f(&format_args!("{}: ${{{}:()}}", field.name(db), idx + 1))
f(&format_args!("{}: ${{{}:()}}", field.name(db).escaped(), idx + 1))
} else {
f(&format_args!("{}: ()", field.name(db)))
f(&format_args!("{}: ()", field.name(db).escaped()))
}
});