We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78ac56e commit f62046aCopy full SHA for f62046a
lua/blink/cmp/accept/text-edits.lua
@@ -40,6 +40,14 @@ function text_edits.get_undo_text_edit_range(text_edit)
40
return range
41
end
42
43
+function text_edits.undo_text_edit(text_edit)
44
+ text_edit = vim.deepcopy(text_edit)
45
+ text_edit.range = text_edits.get_undo_text_edit_range(text_edit)
46
+ text_edit.newText = ''
47
+
48
+ vim.lsp.util.apply_text_edits({ text_edit }, vim.api.nvim_get_current_buf(), 'utf-16')
49
+end
50
51
--- @param item blink.cmp.CompletionItem
52
function text_edits.apply_additional_text_edits(item)
53
-- Apply additional text edits
0 commit comments