emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d376462c718: Revert "Eglot: Make 'try-completion' less broken"


From: João Távora
Subject: master d376462c718: Revert "Eglot: Make 'try-completion' less broken"
Date: Tue, 26 Dec 2023 11:23:37 -0500 (EST)

branch: master
commit d376462c7183752bf44b9bd20bf5020fe7eaf75a
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Revert "Eglot: Make 'try-completion' less broken"
    
    This reverts commit 4dcbf61c1518dc53061707aeff8887517e050003.
    
    It's not correct, breaks tests.  I declare it impossible to make C-M-i
    use of 'try-completion' behave sanely with LSP in its current state.
    YMMV.  Use a completion tooltip, like Company.
---
 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 a97c9e2a3e0..d777e488c43 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3113,8 +3113,8 @@ for which LSP on-type-formatting should be requested."
           ((eq action 'lambda)                           ; test-completion
            (test-completion pattern (funcall proxies)))
           ((eq (car-safe action) 'boundaries) nil)       ; boundaries
-          ((null action)                                 ; try-completion 
(github#1339)
-           pattern)
+          ((null action)                                 ; try-completion
+           (try-completion pattern (funcall proxies)))
           ((eq action t)                                 ; all-completions
            (let ((comps (funcall proxies)))
              (dolist (c comps) (eglot--dumb-flex pattern c t))
@@ -3215,8 +3215,7 @@ for which LSP on-type-formatting should be requested."
                         ;; was obtained from server. If a `proxy'
                         ;; "bar" was obtained from a buffer with
                         ;; "foo.b", the LSP edit applies to that
-                        ;; state, _not_ the current "foo.bar"
-                        ;; (github#1339)
+                        ;; state, _not_ the current "foo.bar".
                         (delete-region orig-pos (point))
                         (insert (substring bounds-string (- orig-pos (car 
bounds))))
                         (eglot--dbind ((TextEdit) range newText) textEdit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]