Support rime-disable-predicates for emacs-rime
This commit is contained in:
parent
1b08590da6
commit
03212a8b64
@ -19,7 +19,7 @@ brew services restart d12frosted/emacs-plus/emacs-plus@29
|
|||||||
osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@29/Emacs.app" at POSIX file "/Applications" with properties {name:"Emacs.app"}'
|
osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@29/Emacs.app" at POSIX file "/Applications" with properties {name:"Emacs.app"}'
|
||||||
|
|
||||||
# fonts
|
# fonts
|
||||||
brew tap laishulu/cask-fonts
|
brew tap laishulu/homebrew
|
||||||
brew install --cask font-sarasa-nerd
|
brew install --cask font-sarasa-nerd
|
||||||
brew install --cask font-symbols-only-nerd-font
|
brew install --cask font-symbols-only-nerd-font
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ cp -r ./rime-ice/* ~/Library/Rime
|
|||||||
rm -rf rime-ice
|
rm -rf rime-ice
|
||||||
brew install --cask switchkey
|
brew install --cask switchkey
|
||||||
|
|
||||||
# pomodoro
|
# org-pomodoro
|
||||||
brew install terminal-notifier
|
brew install terminal-notifier
|
||||||
|
|
||||||
# fetch submodules
|
# fetch submodules
|
||||||
|
@ -5,13 +5,37 @@
|
|||||||
|
|
||||||
(use-package rime
|
(use-package rime
|
||||||
:ensure t
|
:ensure t
|
||||||
|
:custom
|
||||||
|
(default-input-method 'rime)
|
||||||
:config
|
:config
|
||||||
(setq default-input-method "rime")
|
|
||||||
(setq rime-user-data-dir "~/.config/fcitx/rime")
|
(setq rime-user-data-dir "~/.config/fcitx/rime")
|
||||||
(setq rime-show-candidate 'posframe)
|
(setq rime-show-candidate 'posframe)
|
||||||
(when (eq system-type 'darwin)
|
(when (eq system-type 'darwin)
|
||||||
(setq rime-emacs-module-header-root "/opt/homebrew/include")
|
(setq rime-emacs-module-header-root "/opt/homebrew/include")
|
||||||
(setq rime-librime-root "/opt/homebrew/opt/librime"))
|
(setq rime-librime-root "/opt/homebrew/opt/librime"))
|
||||||
|
; 临时英文模式
|
||||||
|
(setq rime-disable-predicates
|
||||||
|
'(meow-motion-mode-p
|
||||||
|
meow-normal-mode-p
|
||||||
|
meow-keypad-mode-p
|
||||||
|
; 在英文字符串之后, 必须以字母开头的英文字符串
|
||||||
|
rime-predicate-after-alphabet-char-p
|
||||||
|
; 在 prog-mode 和 conf-mode 中除注释和引号内字符串之外的区域
|
||||||
|
rime-predicate-prog-in-code-p
|
||||||
|
; 激活 ace-window
|
||||||
|
rime-predicate-ace-window-p
|
||||||
|
; 当要输入的是符号时
|
||||||
|
rime-predicate-current-input-punctuation-p
|
||||||
|
; 在中文字符且有空格之后
|
||||||
|
rime-predicate-space-after-cc-p
|
||||||
|
; 将要输入的是大写字母时
|
||||||
|
rime-predicate-current-uppercase-letter-p
|
||||||
|
; 在 LaTeX 数学环境中或者输入 LaTeX 命令时
|
||||||
|
rime-predicate-tex-math-or-command-p
|
||||||
|
)
|
||||||
|
)
|
||||||
|
; 强制中文模式, 无视 rime-disable-predicates 中的规则
|
||||||
|
(define-key rime-mode-map (kbd "M-j") 'rime-force-enable)
|
||||||
)
|
)
|
||||||
|
|
||||||
(provide 'init-rime)
|
(provide 'init-rime)
|
||||||
|
Loading…
Reference in New Issue
Block a user