diff options
author | jao <jao@gnu.org> | 2022-09-23 04:27:41 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-23 04:28:04 +0100 |
commit | 7b6f4038c3b4ea65f20c70b7c7ad66957d556968 (patch) | |
tree | 37b6f2cd8dfe685ac3a2a1c6f9dd41bd7a975b96 | |
parent | 463ae961086cbc722034a2f87f2fe0e0f80f298b (diff) | |
download | elibs-7b6f4038c3b4ea65f20c70b7c7ad66957d556968.tar.gz elibs-7b6f4038c3b4ea65f20c70b7c7ad66957d556968.tar.bz2 |
eldoc window toggle
-rw-r--r-- | init.el | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -408,11 +408,12 @@ (jao-themes-setup) ;;; Help system -;;;; Help buffers and shortcuts +;;;; help buffers (setq help-window-select t help-window-keep-selected nil help-link-key-to-documentation t) +;;;; find-func/var/lib (use-package find-func :bind (("C-h C-v" . find-variable) ("C-h C-f" . find-function) @@ -429,9 +430,15 @@ eldoc-display-functions '(eldoc-display-in-echo-area)) :config (global-eldoc-mode 1)) -(jao-define-attached-buffer "\\*eldoc\\( .*\\)?\\*" 0.33) +(defun jao-eldoc-toggle () + "Toggle eldoc's documentation buffer." + (interactive) + (let ((buffer (eldoc-doc-buffer))) + (if-let (w (and buffer (get-buffer-window buffer))) + (delete-window w) + (eldoc-doc-buffer t)))) -;; bookmarks +;;;; bookmarks (setq bookmark-default-file "~/.emacs.d/emacs.bmk" bookmark-fringe-mark nil) @@ -905,6 +912,8 @@ (add-to-list 'display-buffer-alist (jao-attached-buffer-entry name-rx height))) +(jao-define-attached-buffer "\\*eldoc\\( .*\\)?\\*" 0.33) + ;;;; images (setq image-use-external-converter t) (setq widget-image-enable nil) @@ -2109,6 +2118,7 @@ ;;;; eglot (use-package eglot :ensure t + :bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle))) :hook ((haskell-mode . eglot-ensure))) ;;;; workarounds |