Skip to content

Commit e288032

Browse files
committed
Show detail when labelDetail is not available
1 parent b9e6f4c commit e288032

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

lsp-completion.el

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ ignored."
6767
:group 'lsp-completion
6868
:package-version '(lsp-mode . "7.0.1"))
6969

70-
(defcustom lsp-completion-show-detail nil
71-
"Whether or not to show detail of completion candidates."
72-
:type 'boolean
73-
:group 'lsp-completion)
74-
7570
(defcustom lsp-completion-no-cache nil
7671
"Whether or not caching the returned completions from server."
7772
:type 'boolean
@@ -248,18 +243,15 @@ The CLEANUP-FN will be called to cleanup."
248243
(lsp:label-details-description? label-details?)))
249244
(-let (((&LabelDetails :detail? :description?) label-details?))
250245
(concat
251-
(unless (and lsp-completion-show-detail
252-
detail?
253-
(string-prefix-p " " detail?))
246+
(unless (and detail? (string-prefix-p " " detail?))
254247
" ")
255-
(when lsp-completion-show-detail
256-
(s-replace "\r" "" detail?))
248+
(s-replace "\r" "" detail?)
257249
(unless (or omit-description
258250
(and description? (string-prefix-p " " description?)))
259251
" ")
260252
(unless omit-description
261253
description?))))
262-
(lsp-completion-show-detail
254+
(detail?
263255
(concat (unless (and detail? (string-prefix-p " " detail?))
264256
" ")
265257
(s-replace "\r" "" detail?))))))

0 commit comments

Comments
 (0)