From d376462c7183752bf44b9bd20bf5020fe7eaf75a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Tue, 26 Dec 2023 08:10:04 -0600 Subject: [PATCH] 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 -- 2.39.2