Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lsp-completion-default-behaviour custom group #4579

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading