Enhance emacs-rime

1. 使用 rime-ice 和 wanxiang-lts-zh-hans.gram
2. 使用 switchkey 在 macOS 系统层面自动切换输入法
This commit is contained in:
lemyx 2025-01-21 07:55:28 +08:00
parent 4b7ac2efa0
commit 1b08590da6
2 changed files with 21 additions and 2 deletions

View File

@ -39,6 +39,24 @@ brew install aider
# rime
brew install --cask squirrel
brew install librime
git clone https://github.com/iDvel/rime-ice.git && cd rime-ice
sed -i '' 's/page_size: 5/page_size: 9/' default.yaml
wget https://github.com/amzxyz/RIME-LMDG/releases/download/LTS/wanxiang-lts-zh-hans.gram
cat <<EOL > rime_ice.custom.yaml
patch:
grammar:
language: wanxiang-lts-zh-hans.gram
collocation_max_length: 5
collocation_min_length: 2
translator/contextual_suggestions: true
translator/max_homophones: 7
translator/max_homographs: 7
EOL
cd ..
cp -r ./rime-ice/* ~/.config/fcitx/rime/
cp -r ./rime-ice/* ~/Library/Rime
rm -rf rime-ice
brew install --cask switchkey
# pomodoro
brew install terminal-notifier

View File

@ -9,8 +9,9 @@
(setq default-input-method "rime")
(setq rime-user-data-dir "~/.config/fcitx/rime")
(setq rime-show-candidate 'posframe)
:bind
("C-SPC" . 'toggle-input-method)
(when (eq system-type 'darwin)
(setq rime-emacs-module-header-root "/opt/homebrew/include")
(setq rime-librime-root "/opt/homebrew/opt/librime"))
)
(provide 'init-rime)