Using Emacs-rime

Use rime(fcitx) in emacs (doom emacs)

Prerequisite

Emacs and rime

This post will not discuss how to configure rime and other parts of emacs.

Install

Follow the instruction at Emacs Rime 安装与使用方法

1
sudo apt install librime-dev

if version of librime < 1.5.3

1
2
3
4
5
sudo apt install git build-essential cmake libboost-all-dev libgoogle-glog-dev libleveldb-dev libmarisa-dev libopencc-dev libyaml-cpp-dev libgtest-dev
git clone https://github.com/rime/librime.git ~/.emacs.d/librime
cd ~/.emacs.d/librime
make
sudo make install

Config Doom Emacs

Insert these into //.doom.d/config.el

1
2
3
4
5
6
7
8
9
10
11
12
13
14
(use-package! rime
:custom
;; (rime-inline-ascii-trigger 'shift-r)
(default-input-method "rime")
(rime-show-candidate 'posframe))

;; replace this dir with your own path
(setq rime-user-data-dir "/home/username/.config/fcitx/rime")

(setq rime-posframe-properties
(list :background-color "#333333"
;; :foreground-color "#dcdccc"
:font "Sarasa Mono SC Nerd-14"
:internal-border-width 10))

Apperance


Reference

https://manateelazycat.github.io/emacs/2020/03/22/emacs-rime.html
https://emacs-china.org/t/doom-emacs-rime/12499/12
https://github.com/DogLooksGood/emacs-rime