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.
(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)