feat(chinese): add +rime

Allows pyim users to select rime as a backend.

Close: #6482
Co-authored-by: merrickluo <merrickluo@users.noreply.github.com>
This commit is contained in:
Henrik Lissner 2023-02-23 02:25:01 -05:00
parent 357d10f5a7
commit b2cdacf457
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 26 additions and 1 deletions

View file

@ -11,12 +11,14 @@ methods: Pinyin and Wubi.
*This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]] *This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]]
** Module flags ** Module flags
/This module has no flags./ - +rime ::
Enables the [[https://rime.im/][rime]] backend for pyim.
** Packages ** Packages
- [[doom-package:ace-pinyin]] - [[doom-package:ace-pinyin]]
- [[doom-package:chinese-wbim]] if [[doom-module:+wubi]] - [[doom-package:chinese-wbim]] if [[doom-module:+wubi]]
- [[doom-package:fcitx]] - [[doom-package:fcitx]]
- [[doom-package:liberime]] if [[doom-module:+rime]]
- [[doom-package:pangu-spacing]] - [[doom-package:pangu-spacing]]
- [[doom-package:pyim]] unless [[doom-module:+wubi]] - [[doom-package:pyim]] unless [[doom-module:+wubi]]
@ -35,6 +37,13 @@ methods: Pinyin and Wubi.
🔨 This module is missing install instructions. [[doom-contrib-module:][Write some?]] 🔨 This module is missing install instructions. [[doom-contrib-module:][Write some?]]
#+end_quote #+end_quote
If you want to use rime as the input method engine:
- Emacs must be built with dynamic module support, i.e. compiled with the
=--with-modules= option.
- You need =librime= installed on your system.
- You need =make=, =cmake= and a C compiler such as =gcc= so that liberime can
build =liberime-core.so=.
* TODO Usage * TODO Usage
#+begin_quote #+begin_quote
🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]] 🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]

View file

@ -9,6 +9,20 @@
default-input-method "pyim")) default-input-method "pyim"))
(use-package! liberime
:when (modulep! +rime)
:init
(setq liberime-auto-build t
liberime-user-data-dir (file-name-concat doom-cache-dir "rime")))
(use-package! pyim-liberime
:when (modulep! +rime)
:after liberime
:config
(setq pyim-default-scheme 'rime))
(use-package! pangu-spacing (use-package! pangu-spacing
:hook (text-mode . pangu-spacing-mode) :hook (text-mode . pangu-spacing-mode)
:config :config

View file

@ -5,3 +5,5 @@
(package! fcitx :pin "12dc2638ddd15c8f6cfaecb20e1f428ab2bb5624") (package! fcitx :pin "12dc2638ddd15c8f6cfaecb20e1f428ab2bb5624")
(package! ace-pinyin :pin "47662c0b05775ba353464b44c0f1a037c85e746e") (package! ace-pinyin :pin "47662c0b05775ba353464b44c0f1a037c85e746e")
(package! pangu-spacing :pin "2303013e5cd7852136f1429162fea0e1c8cb0221") (package! pangu-spacing :pin "2303013e5cd7852136f1429162fea0e1c8cb0221")
(when (modulep! +rime)
(package! liberime :pin "8291e22cd0990a99cb2f88ca67a9065a157f39af"))