rime-all/trime/luna_pinyin.custom.yaml

58 lines
1.7 KiB
YAML

# 朙月拼音 输入方案自定义
patch:
switches: # 注意縮進
- name: ascii_mode
reset: 0 # reset 0 的作用是當從其他輸入方案切換到本方案時,
states: [ 中, 英 ] # 重設爲指定的狀態,而不保留在前一個方案中設定的狀態。
- name: simplification
reset: 1 # 增加這一行:默認啓用「繁→簡」轉換。
states: [ 漢, 汉 ]
- name: symbol_support
reset: 1
states: [ "❀", "🌺" ]
- name: emoji_suggestion
reset: 1
states: [ 😴, 😁️ ]
- options: [ _key_IME_switch ]
states: [ "🌐" ]
- options: [ _key_Hide ]
states: [ "🔻" ]
- name: _hide_candidate
reset: 1
# 配置 engine
'engine/filters/@before 0':
simplifier@emoji_suggestion
'engine/filters/@next 0':
simplifier@symbol_support
'engine/translators/@after last':
lua_translator@date_translator
'translator/dictionary': luna_pinyin.extended
'translator/preedit_format': {}
# emoji
emoji_suggestion:
opencc_config: emoji.json
option_name: emoji_suggestion
tips: all
# 支持符号
symbol_support:
opencc_config: symbol.json
option_name: symbol_support
tips: all
# 标点及特殊表情
'punctuator/import_preset': symbols
'recognizer/patterns/punct': "^/([a-z]+|[0-9])$"
# 添加模糊音
speller/algebra:
__patch:
- pinyin:/zh_z_bufen
- pinyin:/en_eng_bufen
- pinyin:/abbreviation
- pinyin:/spelling_correction
- pinyin:/key_correction
# 添加朙月拼音扩充词库
translator/dictionary: luna_pinyin.extended
...