mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
Eglot: improve treatment of completion items without :sortText (bug#61532)
Previously, defaulting to the empty string put candidates without :sortText to the top of the list. since string-lessp is safe with nil arguments, this makes them sort to the end instead. * lisp/progmodes/eglot.el (eglot-completion-at-point): Simplify.
This commit is contained in:
parent
871cf33a45
commit
893ddd5903
@ -2782,10 +2782,9 @@ for which LSP on-type-formatting should be requested."
|
||||
(cl-sort completions
|
||||
#'string-lessp
|
||||
:key (lambda (c)
|
||||
(or (plist-get
|
||||
(get-text-property 0 'eglot--lsp-item c)
|
||||
:sortText)
|
||||
"")))))
|
||||
(plist-get
|
||||
(get-text-property 0 'eglot--lsp-item c)
|
||||
:sortText)))))
|
||||
(metadata `(metadata (category . eglot)
|
||||
(display-sort-function . ,sort-completions)))
|
||||
resp items (cached-proxies :none)
|
||||
|
Loading…
Reference in New Issue
Block a user