Replies: 2 comments 9 replies
-
I more or less get the idea, but I find your proposal confusing. It would be easier to understand with a patch (and hopefully to Emacs's
You must mean "eldoc in eglot-stay-out-of", surely. |
Beta Was this translation helpful? Give feedback.
-
Here's a diff of the proposed change: --- eglot.el 2024-05-08 19:12:54.755392314 -0300
+++ eglot-proposal.el 2024-05-08 19:15:16.176628500 -0300
@@ -1968,12 +1968,12 @@
(add-function :before-until (local 'imenu-create-index-function)
#'eglot-imenu))
(unless (eglot--stay-out-of-p 'flymake) (flymake-mode 1))
- (unless (eglot--stay-out-of-p 'eldoc)
+ (unless (eglot--stay-out-of-p 'eldoc-documentation-functions)
(add-hook 'eldoc-documentation-functions #'eglot-hover-eldoc-function
nil t)
(add-hook 'eldoc-documentation-functions #'eglot-signature-eldoc-function
- nil t)
- (eldoc-mode 1))
+ nil t))
+ (unless (eglot--stay-out-of-p 'eldoc) (eldoc-mode 1))
(cl-pushnew (current-buffer) (eglot--managed-buffers (eglot-current-server))))
(t
(remove-hook 'after-change-functions #'eglot--after-change t) Instead of managing Is that clearer? I can provide a patch in the mailing list, but since I have other proposed ideas I'd rather discuss all of them and propose a single patch with all of the changes. |
Beta Was this translation helpful? Give feedback.
-
In the body of
eglot--managed-mode
, the followingeglot/eglot.el
Line 1956 in db91d58
should actually be
that way we capture both
eglot
andeglot-documentation-functions
ineglot-stay-out-of
i.e. if you want to manage ElDoc as a whole, useeglot
ineglot-stay-out-of
; although if you only to manage a particular ElDoc variable (in my use case I want to have Eglot seteldoc-documentation-strategy
but not the documentation functions) you can use that instead.We'd also need to move the call to
(eglot-mode 1)
outside of thatunless
, but it could (and should) remain as(or even
(eglot--stay-out-of-p 'eldoc-mode)
?)Beta Was this translation helpful? Give feedback.
All reactions