diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 145248371..5aac6e987 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -1103,6 +1103,11 @@ Other: - New packages: - Added package =chinese-conv= for conversion between simplified and traditional Chinese texts (Xiang Ji) +- Improvements: + - Added variable =chinese-fcitx-use-dbus=, and fixed the misinformation about + dbus in README.org (thanks to AmaiKinono) +- Fixes: + - Make =fcitx.el= work by default (thanks to AmaiKinono) **** Chrome - Key bindings: - Added =markdown= key bindings to gmail message mode diff --git a/layers/+intl/chinese/README.org b/layers/+intl/chinese/README.org index fe9b0c023..dfe17497b 100644 --- a/layers/+intl/chinese/README.org +++ b/layers/+intl/chinese/README.org @@ -10,16 +10,16 @@ - [[#install][Install]] - [[#layer][Layer]] - [[#configuration][Configuration]] - - [[#configure-the-default-input-method配置默认中文输入法][Configure the Default Input Method(配置默认中文输入法)]] - - [[#configure-the-chinese-pyim-input-method配置中文拼音输入法][Configure the =Chinese-pyim= Input Method(配置中文拼音输入法)]] + - [[#configure-the-default-input-method 配置默认中文输入法][Configure the Default Input Method(配置默认中文输入法)]] + - [[#configure-the-chinese-pyim-input-method 配置中文拼音输入法][Configure the =Chinese-pyim= Input Method(配置中文拼音输入法)]] - [[#configure-chinese-conv-配置简繁转换][Configure =chinese-conv= (配置简繁转换)]] - [[#enable-fcitx][Enable fcitx]] - [[#requirement][Requirement]] - [[#linux][Linux]] - [[#mac-os-x][Mac OS X]] - [[#windows][Windows]] - - [[#enable-youdao有道-dictionary激活有道字典][Enable YouDao(有道) Dictionary(激活有道字典)]] - - [[#set-monospaced-font-size设置等宽字体][Set monospaced font size(设置等宽字体)]] + - [[#enable-youdao 有道-dictionary 激活有道字典][Enable YouDao(有道) Dictionary(激活有道字典)]] + - [[#set-monospaced-font-size 设置等宽字体][Set monospaced font size(设置等宽字体)]] - [[#enabledisable-ace-pinyin-in-avy-goto-char][Enable/Disable ace-pinyin in =avy-goto-char=]] - [[#key-bindings][Key bindings]] - [[#youdao-dictionary][Youdao Dictionary]] @@ -99,7 +99,17 @@ with the following configuration. **** Requirement ***** Linux -You need to install =fcitx= and =fcitx-remote= on your machine. +You need to install =fcitx= on your machine. + +It's recommended to use the dbus interface to speed up =fcitx= a little: + +#+BEGIN_SRC emacs-lisp + (setq-default dotspacemacs-configuration-layers '((chinese :variables + chinese-enable-fcitx t + chinese-fcitx-use-dbus t))) +#+END_SRC + +But notice that [[https://github.com/cute-jumper/fcitx.el/issues/30][this may lead to command lag]]. ***** Mac OS X We don't have a =fcitx= in OS X yet but we already added an emulation called diff --git a/layers/+intl/chinese/config.el b/layers/+intl/chinese/config.el index a3e3c0651..6419256a8 100644 --- a/layers/+intl/chinese/config.el +++ b/layers/+intl/chinese/config.el @@ -23,6 +23,9 @@ (defvar chinese-enable-fcitx nil "Enable fcitx to help writing Chinese in Evil mode.") +(defvar chinese-fcitx-use-dbus nil + "Use dbus interface for fcitx.el.") + ;; Set the monospaced font size when mixed Chinese and English words (defun spacemacs//set-monospaced-font (english chinese english-size chinese-size) (set-face-attribute 'default nil :font diff --git a/layers/+intl/chinese/packages.el b/layers/+intl/chinese/packages.el index 2f147273d..b8278ae0a 100644 --- a/layers/+intl/chinese/packages.el +++ b/layers/+intl/chinese/packages.el @@ -26,8 +26,14 @@ (defun chinese/init-fcitx () (use-package fcitx - :init - (fcitx-evil-turn-on))) + :init (fcitx-evil-turn-on) + :config + (progn + (setq fcitx-active-evil-states '(insert emacs hybrid)) + (fcitx-default-setup) + (fcitx-prefix-keys-add "M-m" "C-M-m") + (when chinese-fcitx-use-dbus + (setq fcitx-use-dbus t))))) (defun chinese/init-chinese-wbim () "Initialize chinese-wubi"