From fd404b838f2edf041088a97399592aee36dfdfb6 Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Sun, 6 Oct 2024 17:57:09 +0100 Subject: [PATCH] Fix lsp-completion-default-behaviour custom group --- 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.