0

I installed the eglot package to use for C++ development, and it's going fairly well, but one thing that's driving me nuts is the eldoc package. I have a 13 inch MacBook and it's constantly inflating the minibuffer to about 20% of my screen height to tell be about stuff I don't care about. I don't want to uninstall it, because I like the idea of seeing documentation, when I want to. Is there a way to stop it from showing anything as you move the cursor around, and instead use a specific command to trigger the doc display?

Rob N
  • 547
  • 2
  • 12

1 Answers1

2

To get this

eldoc-help-at-point (bound to C-h D)

eldoc-help-at-point

eldoc-box-hover-mode

eldoc-box-hover-mode

  1. Install eldoc-box: Display ElDoc documentations in a childframe.
  2. Copy the following snippet to my-eldoc-theme.el under custom-theme-directory.
(deftheme my-eldoc "Created 2022-10-08")

(require 'eldoc)
(require 'eldoc-box)

(custom-theme-set-variables 'my-eldoc
                            '(global-eldoc-mode t))

(custom-theme-set-faces 'my-eldoc
                        '(eldoc-box-body
                          ((t
                            (:background "yellow")))))

;; (add-hook 'eldoc-mode-hook
;;        'eldoc-box-hover-at-point-mode)

(add-hook 'eldoc-mode-hook
          'eldoc-box-hover-mode)

(global-set-key (kbd "C-h D") #'eldoc-box-help-at-point)

(provide-theme 'my-eldoc)


  1. M-x load-theme RET my-eldoc RET

  2. Try hovering over a symbol, what happens

  3. Try C-h D on a symbol, see what happens