aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-input-method.el32
1 files changed, 8 insertions, 24 deletions
diff --git a/.emacs.d/lisp/init-input-method.el b/.emacs.d/lisp/init-input-method.el
index e027c44..80c4a4d 100644
--- a/.emacs.d/lisp/init-input-method.el
+++ b/.emacs.d/lisp/init-input-method.el
@@ -4,31 +4,15 @@
(add-hook 'after-init-hook 'fcitx-aggressive-setup 'append)))
(when *is-a-mac*
- (setq sis-external-ism "/usr/local/bin/macism")
- (setq sis-english-source "com.apple.keylayout.ABC"
+ (setq sis-external-ism "/usr/local/bin/macism"
+ sis-english-source "com.apple.keylayout.ABC"
sis-other-source "com.apple.inputmethod.SCIM.ITABC")
- (setq sis-do-get
- (lambda ()
- (string-trim (shell-command-to-string sis-external-ism))))
- (setq sis-do-set
- (lambda (source)
- (start-process "set-input-source" nil
- sis-external-ism source)))
-
- (setq gx/input-method--insert-state-source sis-english-source)
(when (gx/maybe-require-package 'sis)
- (autoload 'sis-get "sis" nil t)
- (autoload 'sis-set-english "sis" nil t)
- (autoload 'sis-set-other "sis" nil t)
- (add-hook 'evil-insert-state-exit-hook
- (lambda ()
- (setq gx/input-method--insert-state-source (sis-get))
- (sis-set-english)))
- (add-hook 'evil-insert-state-entry-hook
- (lambda ()
- (unless (minibufferp)
- (when (string= gx/input-method--insert-state-source
- sis-other-source)
- (sis-set-other)))))))
+ (sis-ism-lazyman-config sis-english-source sis-other-source)
+ (sis-global-respect-mode t)
+ (sis-global-context-mode t)
+ (sis-global-inline-mode t)
+
+ (add-hook 'evil-insert-state-exit-hook #'sis-set-english)))
(provide 'init-input-method)