summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/init.el b/init.el
index 455d03c..70a7224 100644
--- a/init.el
+++ b/init.el
@@ -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