From 7c05662d91f070737087529836326fb407e379ea Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 May 2019 22:19:31 -0400 Subject: [PATCH] input/chinese: lazy load pyim & pangu-spacing And refactor how fcitx & ace-pinyin load. --- modules/input/chinese/config.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/input/chinese/config.el b/modules/input/chinese/config.el index b0d390d45..f019f1a6d 100644 --- a/modules/input/chinese/config.el +++ b/modules/input/chinese/config.el @@ -1,6 +1,7 @@ ;;; input/chinese/config.el -*- lexical-binding: t; -*- (def-package! pyim + :after-call (after-find-file pre-command-hook) :config (setq pyim-dcache-directory (concat doom-cache-dir "pyim/") pyim-page-tooltip t @@ -8,23 +9,23 @@ (def-package! pangu-spacing - :hook (doom-after-init . global-pangu-spacing-mode) + :hook (text-mode . pangu-spacing-mode) :config ;; Always insert `real' space in org-mode. (setq-hook! 'org-mode-hook pangu-spacing-real-insert-separtor t)) (def-package! fcitx - :when (executable-find "fcitx-remote") :after evil - :config (fcitx-evil-turn-on)) + :config + (when (executable-find "fcitx-remote") + (fcitx-evil-turn-on))) (def-package! ace-pinyin - :after (:or avy ace-window) - :config - (setq ace-pinyin-use-avy t) - (ace-pinyin-global-mode t)) + :after avy + :init (setq ace-pinyin-use-avy t) + :config (ace-pinyin-global-mode t)) ;;