Skip to content

Commit

Permalink
Fix lsp-completion-default-behaviour custom group (#4579)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyuenho authored Oct 7, 2024
1 parent 1063d2d commit 9575fd2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lsp-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 9575fd2

Please sign in to comment.