@@ -119,7 +119,7 @@ impl Completion {
119119 fn item_to_transaction(
120120 doc: &Document,
121121 view_id: ViewId,
122− item: &CompletionItem,
122+ item: &lsp::CompletionItem,
123123 offset_encoding: OffsetEncoding,
124124 trigger_offset: usize,
125125 include_placeholder: bool,
@@ -130,7 +130,7 @@ impl Completion {
130130 let text = doc.text().slice(..);
131131 let primary_cursor = selection.primary().cursor(text);
132132
133− let (edit_offset, new_text) = if let Some(edit) = &item.item.text_edit {
133+ let (edit_offset, new_text) = if let Some(edit) = &item.text_edit {
134134 let edit = match edit {
135135 lsp::CompletionTextEdit::Edit(edit) => edit.clone(),
136136 lsp::CompletionTextEdit::InsertAndReplace(item) => {
@@ -153,10 +153,9 @@ impl Completion {
153153 (Some((start_offset, end_offset)), edit.new_text)
154154 } else {
155155 let new_text = item
156− .item
157156 .insert_text
158157 .clone()
159− .unwrap_or_else(|| item.item.label.clone());
158+ .unwrap_or_else(|| item.label.clone());
160159 // check that we are still at the correct savepoint
161160 // we can still generate a transaction regardless but if the
162161 // document changed (and not just the selection) then we will
@@ -165,9 +164,9 @@ impl Completion {
165164 (None, new_text)
166165 };
167166
168− if matches!(item.item.kind, Some(lsp::CompletionItemKind::SNIPPET))
167+ if matches!(item.kind, Some(lsp::CompletionItemKind::SNIPPET))
169168 || matches!(
170− item.item.insert_text_format,
169+ item.insert_text_format,
171170 Some(lsp::InsertTextFormat::SNIPPET)
172171 )
173172 {
@@ -256,7 +255,7 @@ impl Completion {
256255 let transaction = item_to_transaction(
257256 doc,
258257 view.id,
259− item,
258+ &item.item,
260259 language_server!(item).offset_encoding(),
261260 trigger_offset,
262261 true,
@@ -294,7 +293,7 @@ impl Completion {
294293 let transaction = item_to_transaction(
295294 doc,
296295 view.id,
297− &item,
296+ &item.item,
298297 offset_encoding,
299298 trigger_offset,
300299 false,