From a9d196c90408d7f5836a36f02fcfbb5882fbb874 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Wed, 24 Aug 2022 19:22:08 -0800 Subject: [PATCH] Basic automatic character lookup for JA text --- lisp/mitch-packages.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index d11c5ec..a6674bf 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -19,15 +19,22 @@ NAME and ARGS are in `use-package'." (use-package diminish ;; :straight (:type built-in) ) -(use-package eldoc +(use-feature eldoc :straight (:type built-in) - :custom (eldoc-echo-area-use-multiline-p nil) + :diminish :defer 1 - :diminish) (use-package tramp :straight (:type built-in) :custom (tramp-mode nil)) (use-package savehist + :custom (eldoc-echo-area-use-multiline-p nil) + :config + ;; eldoc for 日本語 -- taken from https://cce.whatthefuck.computer/japanese-study + (defun eldoc-jhk (&rest args) + (when (looking-at "[あ-ヿ]") + (get-char-code-property (string-to-char (thing-at-point 'char)) 'name))) + (add-hook 'eldoc-documentation-functions + #'eldoc-jhk)) :straight (:type built-in) :init (savehist-mode)) (use-package whitespace