From 9575fd26bb62f0331f712b67e159b47db7a814fc Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Mon, 7 Oct 2024 08:26:14 +0100 Subject: [PATCH] Fix lsp-completion-default-behaviour custom group (#4579) --- lsp-completion.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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.