Bladeren bron

fix for yaml

Dew-OF-Aurora 5 maanden geleden
bovenliggende
commit
e59721069d
3 gewijzigde bestanden met toevoegingen van 106 en 241 verwijderingen
  1. 5 60
      custom/default.custom.yaml
  2. 101 175
      custom/rime_frost.custom.yaml
  3. 0 6
      custom/squirrel.custom.yaml

+ 5 - 60
custom/default.custom.yaml

@@ -1,65 +1,10 @@
 patch:
   schema_list:
-    - schema: rime_frost # 白霜拼音(全拼)
+    - schema: rime_frost
 
-  # 菜单
-  menu:
-    page_size: 8 # 候选词个数
+  menu/page_size: 8
 
-  # 方案选单相关
-  switcher:
-    caption: 「方案选单」
-    hotkeys:
-      - F4
-      - Control+grave
-      - Control+Shift+grave
-      # - Alt+grave
-    save_options: # 开关记忆(方案中的 switches),从方案选单(而非快捷键)切换时会记住的选项,需要记忆的开关不能设定 reset
-      - ascii_punct
-      - traditionalization
-      - emoji
-      - full_shape
-      - search_single_char
-    fold_options: false # 呼出时是否折叠,多方案时建议折叠 true ,一个方案建议展开 false
-    abbreviate_options: true # 折叠时是否缩写选项
-    option_list_separator: " / " # 折叠时的选项分隔符
+  "switcher/fold_options": false # 呼出时是否折叠
 
-  key_binder:
-    # Lua 配置: 以词定字(上屏当前词句的第一个或最后一个字),和中括号翻页有冲突
-    select_first_character: "bracketleft" # 左中括号 [
-    select_last_character: "bracketright" # 右中括号 ]
-    reduce_freq_cand: "Control+j" # 匹配当前输入码后隐藏指定的候选字词 或候选词条放到第四候选位置
-    drop_cand: "Control+d" # 强制删词, 无视输入的编码
-
-    bindings:
-      # Tab / Shift+Tab 切换光标至下/上一个拼音
-      - { when: composing, accept: Shift+Tab, send: Shift+Left }
-      - { when: composing, accept: Tab, send: Shift+Right }
-
-      # Option/Alt + ←/→ 切换光标至下/上一个拼音
-      - { when: composing, accept: Alt+Left, send: Shift+Left }
-      - { when: composing, accept: Alt+Right, send: Shift+Right }
-
-      # 翻页 - =
-      - { when: has_menu, accept: minus, send: Page_Up }
-      - { when: has_menu, accept: equal, send: Page_Down }
-      - { when: always, toggle: ascii_punct, accept: Control+Shift+3 } # 切换中英标点
-      - { when: always, toggle: ascii_punct, accept: Control+Shift+numbersign } # 切换中英标点
-      - { when: always, toggle: traditionalization, accept: Control+Shift+4 } # 切换简繁
-      - {
-          when: always,
-          toggle: traditionalization,
-          accept: Control+Shift+dollar,
-        } # 切换简繁
-      - { when: composing, accept: Control+k, send: Shift+Delete }
-      - { accept: KP_0, send: 0, when: composing }
-      - { accept: KP_1, send: 1, when: composing }
-      - { accept: KP_2, send: 2, when: composing }
-      - { accept: KP_3, send: 3, when: composing }
-      - { accept: KP_4, send: 4, when: composing }
-      - { accept: KP_5, send: 5, when: composing }
-      - { accept: KP_6, send: 6, when: composing }
-      - { accept: KP_7, send: 7, when: composing }
-      - { accept: KP_8, send: 8, when: composing }
-      - { accept: KP_9, send: 9, when: composing }
-      - { accept: KP_Decimal, send: period, when: composing }
+  key_binder/reduce_freq_cand: "Control+j" # 匹配当前输入码后隐藏指定的候选字词 或候选词条放到第四候选位置
+  key_binder/drop_cand: "Control+d" # 强制删词, 无视输入的编码

+ 101 - 175
custom/rime_frost.custom.yaml

@@ -1,180 +1,106 @@
 patch:
-  switches:
-    - name: ascii_mode
-      states: [中, 西]
-    - name: ascii_punct # 中英标点
-      states: [¥, $]
-    - name: traditionalization
-      states: [简, 繁]
-    - name: emoji
-      states: [💀, 😄]
-    - name: full_shape
-      states: [半角, 全角]
-    - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
-      abbrev: [词, 单]
-      states: [正常, 单字]
-
-  reduce_english_filter/mode: all
-
-  custom_phrase:
-    dictionary: ""
-    user_dict: custom_phrase # 可以修改这里,改成自己的 txt 文件
-    db_class: tabledb # 只读数据库,无法动态调频;设为 tabledb 可以动态调频
-    enable_completion: false # 补全提示
-    enable_sentence: false # 禁止造句
-    initial_quality: 1000 # custom_phrase 的权重应该比 pinyin 和 melt_eng 大
+  engine/processors/+:
+    - lua_processor@*cold_word_drop.processor
+  engine/filters/+:
+    - lua_filter@*cold_word_drop.filter
 
-  engine:
-    processors:
-      - lua_processor@*cold_word_drop.processor
-      - lua_processor@*select_character # 以词定字
-      - ascii_composer
-      - recognizer
-      - key_binder
-      - speller
-      - punctuator
-      - selector
-      - navigator
-      - express_editor
-    segmentors:
-      - ascii_segmentor
-      - matcher
-      - abc_segmentor
-      - affix_segmentor@radical_lookup # 部件拆字自定义 tag
-      - punct_segmentor
-      - fallback_segmentor
-    translators:
-      - punct_translator
-      - script_translator
-      - lua_translator@*date_translator # 时间、日期、星期
-      - lua_translator@*lunar # 农历
-      - table_translator@custom_phrase # 自定义短语 custom_phrase.txt
-      - table_translator@melt_eng # 英文输入
-      - table_translator@cn_en # 中英混合词汇
-      - table_translator@radical_lookup # 部件拆字反查
-      - lua_translator@*unicode # Unicode
-      - lua_translator@*number_translator # 数字、金额大写
-      - lua_translator@*force_gc # 暴力 GC
-      - lua_translator@*calculator # 计算器
-    filters:
-      - lua_filter@*cold_word_drop.filter
-      - lua_filter@*is_in_user_dict # 用户词典的词加上一个*
-      - lua_filter@*corrector # 错音错字提示
-      - reverse_lookup_filter@radical_reverse_lookup # 部件拆字滤镜
-      - lua_filter@*autocap_filter # 英文自动大写
-      - lua_filter@*v_filter # v 模式 symbols 优先
-      - lua_filter@*pin_cand_filter # 置顶候选项(顺序要求:置顶候选项 > Emoji > 简繁切换)
-      - lua_filter@*long_word_filter # 长词优先(顺序要求:长词优先 > Emoji)
-      - lua_filter@*reduce_english_filter # 降低部分英语单词在候选项的位置
-      - simplifier@emoji # Emoji
-      - simplifier@traditionalize # 简繁切换
-      - lua_filter@*aux_code # 墨奇辅助码
-      - uniquifier # 去重
-
-  speller:
-    # 如果不想让什么标点直接上屏,可以加在 alphabet,或者编辑标点符号为两个及以上的映射
-    alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA`/
-    # initials 定义仅作为始码的按键,排除 ` 让单个的 ` 可以直接上屏
-    initials: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
-    delimiter: " '" # 第一位<空格>是拼音之间的分隔符;第二位<'>表示可以手动输入单引号来分割拼音。
-    algebra:
-      ### 模糊音
-      # 声母
-      - derive/^([zcs])h/$1/ # zh* ch* sh* 派生出 z* c* s*
-      - derive/^([zcs])([^h])/$1h$2/ # z* c* s*    派生出 zh* ch* sh*
-      - derive/ang$/an/
-      - derive/an$/ang/
-      - derive/eng$/en/
-      - derive/en$/eng/
-      - derive/in$/ing/
-      - derive/ing$/in/
-      - derive/ian$/iang/
-      - derive/iang$/ian/
-      - derive/uan$/uang/
-      - derive/uang$/uan/
-      - derive/ong$/on/
-      - derive/on$/ong/
-
-      ### 超级简拼
-      - erase/^hm$/ # 响应超级简拼,取消「噷 hm」的独占(如果拼音词库有这个音节的话,雾凇里没有)
-      - erase/^m$/ # 响应超级简拼,取消「呣 m」的独占(如果拼音词库有这个音节的话,雾凇里没有)
-      - erase/^n$/ # 响应超级简拼,取消「嗯 n」的独占(如果拼音词库有这个音节的话,雾凇里没有)
-      - erase/^ng$/ # 响应超级简拼,取消「嗯 ng」的独占(如果拼音词库有这个音节的话,雾凇里没有)
+  switches:
+    - { name: ascii_mode, states: [中, 西] }
 
-      - abbrev/^([a-z]).+$/$1/ # 超级简拼
-      - abbrev/^([zcs]h).+$/$1/ # 超级简拼中,zh ch sh 视为整体(ch'sh → 城市),而不是像这样分开(c'h's'h → 吃好睡好)。
-      - abbrev/^([a-z]i).+$/$1/
+  "reduce_english_filter/mode": all
 
-      ### v u 转换
-      # 雾凇的词库严格按照正确的 u v(ü) 注音的,支持使用 qu/qv nue/nve 来输入 qu nve
-      - derive/^([nl])ve$/$1ue/
-      - derive/^([jqxy])u/$1v/
-      # 以防引入的其他词库没按照正确方式注音,也做一个转换
-      - derive/^([nl])ue$/$1ve/
-      - derive/^([jqxy])v/$1u/
+  "custom_phrase":
+    "db_class": tabledb # 只读数据库,无法动态调频;设为 tabledb 可以动态调频
+    "initial_quality": 1000 # custom_phrase 的权重应该比 pinyin 和 melt_eng 大
 
-      ### 自动纠错
-      ########## START 这几个有副作用的规则圈起来,方便取舍
-      # 这些规则对全拼简拼混输有副作用:如「x'ai 喜爱」被纠错为「xia 下」
-      # zh、ch、sh
-      - derive/([zcs])h(a|e|i|u|ai|ei|an|en|ou|uo|ua|un|ui|uan|uai|uang|ang|eng|ong)$/h$1$2/ # hzi → zhi
-      # - derive/([zcs])h([aeiu])$/$1$2h/ # zih → zhi
-      ########## END
-      # ai
-      - derive/^([wghk])ai$/$1ia/ # wia → wai
-      # ei
-      - derive/([wfghkz])ei$/$1ie/ # wie → wei
-      # ie
-      - derive/([jqx])ie$/$1ei/ # jei → jie
-      # ao
-      - derive/([rtypsdghklzcbnm])ao$/$1oa/
-      # ou
-      - derive/([ypfm])ou$/$1uo/
-      # uo(无)
-      # ang
-      - derive/([wrtypsdfghklzcbnm])ang$/$1nag/
-      - derive/([wrtypsdfghklzcbnm])ang$/$1agn/
-      # eng
-      - derive/([wrtpsdfghklzcbnm])eng$/$1neg/
-      - derive/([wrtpsdfghklzcbnm])eng$/$1egn/
-      # ing
-      - derive/([qtypdjlxbnm])ing$/$1nig/
-      - derive/([qtypdjlxbnm])ing$/$1ign/
-      # ong
-      - derive/([rtysdghklzcn])ong$/$1nog/
-      - derive/([rtysdghklzcn])ong$/$1ogn/
-      # iao
-      - derive/([qtpdjlxbnm])iao$/$1ioa/
-      - derive/([qtpdjlxbnm])iao$/$1oia/
-      # ui
-      - derive/([rtsghkzc])ui$/$1iu/
-      # iu
-      - derive/([qjlxnm])iu$/$1ui/
-      # iang
-      - derive/([qjlxn])iang$/$1aing/
-      - derive/([qjlxn])iang$/$1inag/
-      # ua
-      - derive/([g|k|h|zh|sh])ua$/$1au/
-      # uai
-      - derive/([g|h|k|zh|ch|sh])uai$/$1aui/
-      # - derive/([g|h|k|zh|ch|sh])uai$/$1uia/ # 和「会啊、追啊」等常用词有冲突
-      # uan
-      - derive/([qrtysdghjklzxcn])uan$/$1aun/
-      # - derive/([qrtysdghjklzxcn])uan$/$1una/ # 和「去哪、露娜」等常用词有冲突
-      # ue
-      - derive/([nlyjqx])ue$/$1eu/
-      # uang
-      - derive/([g|h|k|zh|ch|sh])uang$/$1aung/
-      - derive/([g|h|k|zh|ch|sh])uang$/$1uagn/
-      - derive/([g|h|k|zh|ch|sh])uang$/$1unag/
-      - derive/([g|h|k|zh|ch|sh])uang$/$1augn/
-      # iong
-      - derive/([jqx])iong$/$1inog/
-      - derive/([jqx])iong$/$1oing/
-      - derive/([jqx])iong$/$1iogn/
-      - derive/([jqx])iong$/$1oign/
-      # 其他
-      - derive/([rtsdghkzc])o(u|ng)$/$1o/ # do → dou|dong
-      - derive/(.+)ong$/$1on/ # lon → long
-      - derive/([tl])eng$/$1en/ # ten → teng
-      - derive/([qwrtypsdfghjklzxcbnm])([aeio])ng$/$1ng/ # lng → lang、leng、ling、long
+  "speller/algebra":
+    - derive/^([zcs])h/$1/ # zh* ch* sh* 派生出 z* c* s*
+    - derive/^([zcs])([^h])/$1h$2/ # z* c* s*    派生出 zh* ch* sh*
+    - derive/ang$/an/
+    - derive/an$/ang/
+    - derive/eng$/en/
+    - derive/en$/eng/
+    - derive/in$/ing/
+    - derive/ing$/in/
+    - derive/ian$/iang/
+    - derive/iang$/ian/
+    - derive/uan$/uang/
+    - derive/uang$/uan/
+    - derive/ong$/on/
+    - derive/on$/ong/
+    ### 超级简拼
+    - erase/^hm$/ # 响应超级简拼,取消「噷 hm」的独占(如果拼音词库有这个音节的话,雾凇里没有)
+    - erase/^m$/ # 响应超级简拼,取消「呣 m」的独占(如果拼音词库有这个音节的话,雾凇里没有)
+    - erase/^n$/ # 响应超级简拼,取消「嗯 n」的独占(如果拼音词库有这个音节的话,雾凇里没有)
+    - erase/^ng$/ # 响应超级简拼,取消「嗯 ng」的独占(如果拼音词库有这个音节的话,雾凇里没有)
+    - abbrev/^([a-z]).+$/$1/ # 超级简拼
+    - abbrev/^([zcs]h).+$/$1/ # 超级简拼中,zh ch sh 视为整体(ch'sh → 城市),而不是像这样分开(c'h's'h → 吃好睡好)。
+    - abbrev/^([a-z]i).+$/$1/
+    ### v u 转换
+    # 雾凇的词库严格按照正确的 u v(ü) 注音的,支持使用 qu/qv nue/nve 来输入 qu nve
+    - derive/^([nl])ve$/$1ue/
+    - derive/^([jqxy])u/$1v/
+    # 以防引入的其他词库没按照正确方式注音,也做一个转换
+    - derive/^([nl])ue$/$1ve/
+    - derive/^([jqxy])v/$1u/
+    ### 自动纠错
+    # zh、ch、sh
+    - derive/([zcs])h(a|e|i|u|ai|ei|an|en|ou|uo|ua|un|ui|uan|uai|uang|ang|eng|ong)$/h$1$2/ # hzi → zhi
+    # - derive/([zcs])h([aeiu])$/$1$2h/ # zih → zhi
+    # ai
+    - derive/^([wghk])ai$/$1ia/ # wia → wai
+    # ei
+    - derive/([wfghkz])ei$/$1ie/ # wie → wei
+    # ie
+    - derive/([jqx])ie$/$1ei/ # jei → jie
+    # ao
+    - derive/([rtypsdghklzcbnm])ao$/$1oa/
+    # ou
+    - derive/([ypfm])ou$/$1uo/
+    # ang
+    - derive/([wrtypsdfghklzcbnm])ang$/$1nag/
+    - derive/([wrtypsdfghklzcbnm])ang$/$1agn/
+    # eng
+    - derive/([wrtpsdfghklzcbnm])eng$/$1neg/
+    - derive/([wrtpsdfghklzcbnm])eng$/$1egn/
+    # ing
+    - derive/([qtypdjlxbnm])ing$/$1nig/
+    - derive/([qtypdjlxbnm])ing$/$1ign/
+    # ong
+    - derive/([rtysdghklzcn])ong$/$1nog/
+    - derive/([rtysdghklzcn])ong$/$1ogn/
+    # iao
+    - derive/([qtpdjlxbnm])iao$/$1ioa/
+    - derive/([qtpdjlxbnm])iao$/$1oia/
+    # ui
+    - derive/([rtsghkzc])ui$/$1iu/
+    # iu
+    - derive/([qjlxnm])iu$/$1ui/
+    # iang
+    - derive/([qjlxn])iang$/$1aing/
+    - derive/([qjlxn])iang$/$1inag/
+    # ua
+    - derive/([g|k|h|zh|sh])ua$/$1au/
+    # uai
+    - derive/([g|h|k|zh|ch|sh])uai$/$1aui/
+    # - derive/([g|h|k|zh|ch|sh])uai$/$1uia/ # 和「会啊、追啊」等常用词有冲突
+    # uan
+    - derive/([qrtysdghjklzxcn])uan$/$1aun/
+    # - derive/([qrtysdghjklzxcn])uan$/$1una/ # 和「去哪、露娜」等常用词有冲突
+    # ue
+    - derive/([nlyjqx])ue$/$1eu/
+    # uang
+    - derive/([g|h|k|zh|ch|sh])uang$/$1aung/
+    - derive/([g|h|k|zh|ch|sh])uang$/$1uagn/
+    - derive/([g|h|k|zh|ch|sh])uang$/$1unag/
+    - derive/([g|h|k|zh|ch|sh])uang$/$1augn/
+    # iong
+    - derive/([jqx])iong$/$1inog/
+    - derive/([jqx])iong$/$1oing/
+    - derive/([jqx])iong$/$1iogn/
+    - derive/([jqx])iong$/$1oign/
+    # 其他
+    - derive/([rtsdghkzc])o(u|ng)$/$1o/ # do → dou|dong
+    - derive/(.+)ong$/$1on/ # lon → long
+    - derive/([tl])eng$/$1en/ # ten → teng
+    - derive/([qwrtypsdfghjklzxcbnm])([aeio])ng$/$1ng/ # lng → lang、leng、ling、long

+ 0 - 6
custom/squirrel.custom.yaml

@@ -1,5 +1,4 @@
 patch:
-  # ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
   app_options:
     com.apple.Spotlight: # 聚焦搜索
       ascii_mode: false # true默认英文,false默认中文
@@ -16,13 +15,8 @@ patch:
       ascii_mode: true
 
   style:
-    # 选择皮肤,亮色与暗色主题
-    # color_scheme: purity_of_form_custom
-    # color_scheme_dark: purity_of_form_custom
     color_scheme: macos_light
     color_scheme_dark: macos_dark
-    # color_scheme: mac_light
-    # color_scheme_dark: mac_dark
 
     # 预设选项:(可被皮肤覆盖;如果皮肤没写,则默认使用这些属性。)
     text_orientation: horizontal # horizontal | vertical