aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2023-12-26 08:10:04 -0600
committerJoão Távora2023-12-26 10:10:14 -0600
commitd376462c7183752bf44b9bd20bf5020fe7eaf75a (patch)
tree5e964e9fa86210860ee5cc55692409fe0df1c1d6
parent4dcbf61c1518dc53061707aeff8887517e050003 (diff)
downloademacs-d376462c7183752bf44b9bd20bf5020fe7eaf75a.tar.gz
emacs-d376462c7183752bf44b9bd20bf5020fe7eaf75a.zip
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.
-rw-r--r--lisp/progmodes/eglot.el7
1 files 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."
3113 ((eq action 'lambda) ; test-completion 3113 ((eq action 'lambda) ; test-completion
3114 (test-completion pattern (funcall proxies))) 3114 (test-completion pattern (funcall proxies)))
3115 ((eq (car-safe action) 'boundaries) nil) ; boundaries 3115 ((eq (car-safe action) 'boundaries) nil) ; boundaries
3116 ((null action) ; try-completion (github#1339) 3116 ((null action) ; try-completion
3117 pattern) 3117 (try-completion pattern (funcall proxies)))
3118 ((eq action t) ; all-completions 3118 ((eq action t) ; all-completions
3119 (let ((comps (funcall proxies))) 3119 (let ((comps (funcall proxies)))
3120 (dolist (c comps) (eglot--dumb-flex pattern c t)) 3120 (dolist (c comps) (eglot--dumb-flex pattern c t))
@@ -3215,8 +3215,7 @@ for which LSP on-type-formatting should be requested."
3215 ;; was obtained from server. If a `proxy' 3215 ;; was obtained from server. If a `proxy'
3216 ;; "bar" was obtained from a buffer with 3216 ;; "bar" was obtained from a buffer with
3217 ;; "foo.b", the LSP edit applies to that 3217 ;; "foo.b", the LSP edit applies to that
3218 ;; state, _not_ the current "foo.bar" 3218 ;; state, _not_ the current "foo.bar".
3219 ;; (github#1339)
3220 (delete-region orig-pos (point)) 3219 (delete-region orig-pos (point))
3221 (insert (substring bounds-string (- orig-pos (car bounds)))) 3220 (insert (substring bounds-string (- orig-pos (car bounds))))
3222 (eglot--dbind ((TextEdit) range newText) textEdit 3221 (eglot--dbind ((TextEdit) range newText) textEdit