diff --git a/eglot.el b/eglot.el index 43bc0235..28a014f3 100644 --- a/eglot.el +++ b/eglot.el @@ -1834,7 +1834,11 @@ is not active." (add-text-properties 0 1 all completion) (put-text-property 0 1 'eglot--lsp-completion all completion) completion)) - items)))) + (sort items + (lambda (a b) + (string-lessp + (or (plist-get a :sortText) "") + (or (plist-get b :sortText) "")))))))) :annotation-function (lambda (obj) (eglot--dbind ((CompletionItem) detail kind insertTextFormat) @@ -1852,12 +1856,6 @@ is not active." (and (eql insertTextFormat 2) (eglot--snippet-expansion-fn) " (snippet)")))))) - :display-sort-function - (lambda (items) - (sort items (lambda (a b) - (string-lessp - (or (get-text-property 0 :sortText a) "") - (or (get-text-property 0 :sortText b) ""))))) :company-doc-buffer (lambda (obj) (let* ((documentation