diff --git a/lsp-completion.el b/lsp-completion.el index 2b849bc414..e2c336fd4b 100644 --- a/lsp-completion.el +++ b/lsp-completion.el @@ -102,6 +102,14 @@ This will help minimize popup flickering issue in `company-mode'." :group 'lsp-completion :package-version '(lsp-mode . "8.0.0")) +(defcustom lsp-completion-default-behaviour :replace + "Default behaviour of `InsertReplaceEdit'." + :type '(choice + (const :tag "Default completion inserts" :insert) + (const :tag "Default completion replaces" :replace)) + :group 'lsp-completion + :package-version '(lsp-mode . "8.0.0")) + (defconst lsp-completion--item-kind [nil "Text" @@ -211,14 +219,6 @@ KEEP-LAST-RESULT if specified." (setq lsp-completion--cache nil) (unless keep-last-result (setq lsp-completion--last-result nil))) -(defcustom lsp-completion-default-behaviour :replace - "Default behaviour of `InsertReplaceEdit'." - :type '(choice - (const :tag "Default completion inserts" :insert) - (const :tag "Default completion replaces" :replace)) - :group 'lsp-mode - :package-version '(lsp-mode . "8.0.0")) - (lsp-defun lsp-completion--guess-prefix ((item &as &CompletionItem :text-edit?)) "Guess ITEM's prefix start point according to following heuristics: - If `textEdit' exists, use insertion range start as prefix start point.