[chinese] Add fcitx5 support

This commit is contained in:
wgjak47 2019-11-08 14:51:15 +08:00 committed by duianto
parent 247830ab40
commit 58ce74d80d
4 changed files with 17 additions and 0 deletions

View File

@ -1223,6 +1223,7 @@ Other:
- Improvements:
- Added variable =chinese-fcitx-use-dbus=, and fixed the misinformation about
dbus in README.org (thanks to AmaiKinono)
- Added =fcitx5= support (thanks to wgjak47)
- Fixes:
- Make =fcitx.el= work by default (thanks to AmaiKinono)
**** Chrome

View File

@ -14,6 +14,7 @@
- [[#configure-the-chinese-pyim-input-method-配置中文拼音输入法][Configure the =Chinese-pyim= Input Method (配置中文拼音输入法)]]
- [[#configure-chinese-conv-配置简繁转换][Configure =chinese-conv= (配置简繁转换)]]
- [[#enable-fcitx][Enable fcitx]]
- [[#enable-fcitx5][Enable Fcitx5]]
- [[#requirement][Requirement]]
- [[#linux][Linux]]
- [[#macos][macOS]]
@ -93,6 +94,16 @@ to replace the current selection in-place.
If you don't need to type Chinese in minibuffer, you can temporarily disable fcitx in the minibuffer
with the following configuration.
**** Enable Fcitx5
If you want to use fcitx5 instead of fcitx4, enable the variable
=chinese-use-fcitx5=:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((chinese :variables
chinese-use-fcitx5 t
chinese-enable-fcitx t)))
#+END_SRC
#+BEGIN_SRC emacs-lisp
(fcitx-aggressive-setup)
#+END_SRC

View File

@ -23,6 +23,9 @@
(defvar chinese-enable-fcitx nil
"Enable fcitx to help writing Chinese in Evil mode.")
(defvar chinese-use-fcitx5 nil
"Enable fcitx5 instead fcitx4.")
(defvar chinese-fcitx-use-dbus nil
"Use dbus interface for fcitx.el.")

View File

@ -30,6 +30,8 @@
:config
(progn
(setq fcitx-active-evil-states '(insert emacs hybrid))
(when chinese-use-fcitx5
(setq fcitx-remote-command "fcitx5-remote"))
(fcitx-default-setup)
(fcitx-prefix-keys-add "M-m" "C-M-m")
(when chinese-fcitx-use-dbus