Eglot: make better use of :company-docsig
* lisp/progmodes/eglot.el (eglot-completion-at-point): Make better use of :company-docsig
This commit is contained in:
parent
5f9982eded
commit
4847168c5b
1 changed files with 6 additions and 5 deletions
|
@ -3483,12 +3483,13 @@ for which LSP on-type-formatting should be requested."
|
|||
1)
|
||||
(eq t (plist-get lsp-item :deprecated)))))
|
||||
:company-docsig
|
||||
;; FIXME: autoImportText is specific to the pyright language server
|
||||
(lambda (proxy)
|
||||
(when-let* ((lsp-comp (get-text-property 0 'eglot--lsp-item proxy))
|
||||
(data (plist-get (ensure-resolved lsp-comp) :data))
|
||||
(import-text (plist-get data :autoImportText)))
|
||||
import-text))
|
||||
(let ((detail (plist-get
|
||||
(ensure-resolved (get-text-property 0 'eglot--lsp-item proxy))
|
||||
:detail)))
|
||||
(when (and (stringp detail) (not (string= detail "")))
|
||||
;; Forces major-mode based fontification
|
||||
(eglot--format-markup (list :value detail)))))
|
||||
:company-doc-buffer
|
||||
(lambda (proxy)
|
||||
(let* ((resolved
|
||||
|
|
Loading…
Add table
Reference in a new issue