[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 893ddd5903e: Eglot: improve treatment of completion items witho
From: |
João Távora |
Subject: |
emacs-29 893ddd5903e: Eglot: improve treatment of completion items without :sortText (bug#61532) |
Date: |
Sun, 19 Feb 2023 06:11:20 -0500 (EST) |
branch: emacs-29
commit 893ddd5903e1b0345f22b124e5d6fe8fc89ef6af
Author: Theodor Thornhill <theo@thornhill.no>
Commit: João Távora <joaotavora@gmail.com>
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.
---
lisp/progmodes/eglot.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 82401b685ce..d941aec4688 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 893ddd5903e: Eglot: improve treatment of completion items without :sortText (bug#61532),
João Távora <=