input/chinese: lazy load pyim & pangu-spacing

And refactor how fcitx & ace-pinyin load.
This commit is contained in:
Henrik Lissner 2019-05-21 22:19:31 -04:00
parent be17d9bd1f
commit 7c05662d91
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -1,6 +1,7 @@
;;; input/chinese/config.el -*- lexical-binding: t; -*- ;;; input/chinese/config.el -*- lexical-binding: t; -*-
(def-package! pyim (def-package! pyim
:after-call (after-find-file pre-command-hook)
:config :config
(setq pyim-dcache-directory (concat doom-cache-dir "pyim/") (setq pyim-dcache-directory (concat doom-cache-dir "pyim/")
pyim-page-tooltip t pyim-page-tooltip t
@ -8,23 +9,23 @@
(def-package! pangu-spacing (def-package! pangu-spacing
:hook (doom-after-init . global-pangu-spacing-mode) :hook (text-mode . pangu-spacing-mode)
:config :config
;; Always insert `real' space in org-mode. ;; Always insert `real' space in org-mode.
(setq-hook! 'org-mode-hook pangu-spacing-real-insert-separtor t)) (setq-hook! 'org-mode-hook pangu-spacing-real-insert-separtor t))
(def-package! fcitx (def-package! fcitx
:when (executable-find "fcitx-remote")
:after evil :after evil
:config (fcitx-evil-turn-on)) :config
(when (executable-find "fcitx-remote")
(fcitx-evil-turn-on)))
(def-package! ace-pinyin (def-package! ace-pinyin
:after (:or avy ace-window) :after avy
:config :init (setq ace-pinyin-use-avy t)
(setq ace-pinyin-use-avy t) :config (ace-pinyin-global-mode t))
(ace-pinyin-global-mode t))
;; ;;