den-mentiei / dotfiles

Configuration files.
1 stars 0 forks source link

Eldoc toggle #45

Open den-mentiei opened 1 year ago

den-mentiei commented 1 year ago
(use-package eldoc
  :ensure nil
  :demand t
  :custom
  (eldoc-echo-area-use-multiline-p nil)
  :bind
  (:map hoagie-second-keymap
        ;; "h" for "help"
        ("h" . hoagie-toggle-eldoc-buffer))
  :config
  (global-eldoc-mode)
  (defun hoagie-toggle-eldoc-buffer ()
    "Toggle the eldoc help buffer."
    (interactive)
    (let ((eldoc-window (get-buffer-window eldoc--doc-buffer)))
      (if eldoc-window
          (quit-window nil eldoc-window)
        (eldoc-doc-buffer t)))))