summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-programming.el
diff options
context:
space:
mode:
Diffstat (limited to 'custom/jao-custom-programming.el')
-rw-r--r--custom/jao-custom-programming.el25
1 files changed, 23 insertions, 2 deletions
diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el
index fb98314..925c2f0 100644
--- a/custom/jao-custom-programming.el
+++ b/custom/jao-custom-programming.el
@@ -1,6 +1,26 @@
;; -*- lexical-binding: t -*-
;;; Tools
+;;;; eldoc
+(use-package eldoc
+ :init (setq eldoc-minor-mode-string nil
+ eldoc-idle-delay 0.1
+ eldoc-echo-area-display-truncation-message nil
+ eldoc-echo-area-use-multiline-p 5
+ eldoc-echo-area-prefer-doc-buffer 'maybe
+ eldoc-display-functions '(eldoc-display-in-echo-area))
+ :config (global-eldoc-mode 1))
+
+(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))))
+
+(jao-define-attached-buffer "\\*eldoc\\( .*\\)?\\*" 12)
+
;;;; automatic modes
(add-to-list 'auto-mode-alist '("\\.mix\\'" . hexl-mode))
(add-to-list 'auto-mode-alist '("\\.m4\\'" . m4-mode))
@@ -35,8 +55,9 @@
(use-package eglot
:init ;; (setq eglot-ignored-server-capabilites '(:inlayHintProvider))
(defun jao-eglot-managed-mode-hook ()
- (flymake-mode -1)
- (eglot-inlay-hints-mode -1))
+ (flymake-mode 1)
+ (eglot-inlay-hints-mode -1)
+ (setq-local eldoc-display-functions '(eldoc-display-in-buffer)))
:config
:hook (eglot--managed-mode . jao-eglot-managed-mode-hook)
:bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle))))