Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eldoc-mode disabled, global-eldoc-mode ignored. #2934

Closed
convexstrictly opened this issue Nov 23, 2020 · 3 comments · Fixed by #3008
Closed

eldoc-mode disabled, global-eldoc-mode ignored. #2934

convexstrictly opened this issue Nov 23, 2020 · 3 comments · Fixed by #3008
Labels
bug good first issue A simple tasks suitable for first-time contributors

Comments

@convexstrictly
Copy link

I upgraded to emacs 27.1 and cider 20201122.1448. For some reason, eldoc-mode is always nil before and after jack-in. global-eldoc-mode is t. However until I enable eldoc-mode, I don't see any function signatures in the minibuffer.

System Information

;; CIDER 1.0.0snapshot (package: 20201122.1448), nREPL 0.8.3
;; Clojure 1.10.1, Java 13

Linux desktop 4.4.0-194-generic #226-Ubuntu SMP Wed Oct 21 10:19:36 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I even reduced my .emacs to just the following lines to ensure it wasn't some side-effect of some other configuration that was causing these problems.

(package-initialize)
(add-to-list 'package-archives 
	     '("melpa" . "http://melpa.org/packages/")
	     '("marmalade" . "http://marmalade-repo.org/packages/"))

(eval-when-compile
  (require 'use-package))
@bbatsov
Copy link
Member

bbatsov commented Apr 7, 2021

I'm guessing this might be something to do with the eldoc setup function:

(defun cider-eldoc-setup ()
  "Setup eldoc in the current buffer.
eldoc mode has to be enabled for this to have any effect."
  ;; Emacs 28.1 changes the way eldoc is setup.
  ;; There you can have multiple eldoc functions.
  (if (boundp 'eldoc-documentation-functions)
      (add-hook 'eldoc-documentation-functions #'cider-eldoc nil t)
    (setq-local eldoc-documentation-function #'cider-eldoc))
  (apply #'eldoc-add-command cider-extra-eldoc-commands))

I'll investigate this further when I can.

@bbatsov bbatsov added bug good first issue A simple tasks suitable for first-time contributors labels Apr 7, 2021
@bbatsov
Copy link
Member

bbatsov commented Apr 7, 2021

Btw, I can't reproduce this issue on Emacs 27. Everything works fine for me with only global-eldoc-mode enabled.

@pdbrown
Copy link
Contributor

pdbrown commented Apr 21, 2021

I noticed this too, on Emacs 28: Before cider starts, clojure-mode buffers don't have eldoc as expected. Once cider is running, new buffers enable eldoc, also as expected. But after starting cider, we run cider-enable-on-existing-clojure-buffers, which does cider-eldoc-setup but doesn't retrigger turn-on-eldoc-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue A simple tasks suitable for first-time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants