2023-05-08 10:42:21 +02:00
|
|
|
|
-- Rime Lua 扩展 https://github.com/hchunhui/librime-lua
|
|
|
|
|
-- 文档 https://github.com/hchunhui/librime-lua/wiki/Scripting
|
|
|
|
|
|
2023-05-16 16:21:36 +02:00
|
|
|
|
-- v 模式 symbols 优先(全拼)
|
|
|
|
|
v_filter = require("v_filter")
|
|
|
|
|
|
|
|
|
|
-- 长词优先(全拼)
|
|
|
|
|
long_word_filter = require("long_word_filter")
|
|
|
|
|
|
|
|
|
|
-- 降低部分英语单词在候选项的位置
|
|
|
|
|
-- 可在方案中配置要降低的单词
|
|
|
|
|
reduce_english_filter = require("reduce_english_filter")
|
|
|
|
|
|
2023-05-09 15:19:59 +02:00
|
|
|
|
-- 以词定字
|
2023-05-16 16:21:36 +02:00
|
|
|
|
-- 可在 default.yaml key_binder 下配置快捷键,默认为左右中括号 [ ]
|
2023-05-08 10:42:21 +02:00
|
|
|
|
select_character = require("select_character")
|
2023-05-16 16:21:36 +02:00
|
|
|
|
|
2023-05-09 15:19:59 +02:00
|
|
|
|
-- 日期时间
|
2023-05-16 16:21:36 +02:00
|
|
|
|
-- 可在方案中配置触发关键字。
|
2023-05-08 10:42:21 +02:00
|
|
|
|
date_translator = require("date_translator")
|
2023-05-16 16:21:36 +02:00
|
|
|
|
|
|
|
|
|
-- Unicode,U 开头
|
2023-05-08 10:42:21 +02:00
|
|
|
|
unicode = require("unicode")
|
2023-05-16 16:21:36 +02:00
|
|
|
|
|
|
|
|
|
-- 数字、人民币大写,R 开头
|
|
|
|
|
number_translator = require("number_translator")
|
|
|
|
|
|
2023-05-30 16:06:38 +02:00
|
|
|
|
-- 自动大写英文词汇
|
|
|
|
|
autocap_filter = require("autocap_filter")
|
2023-05-21 04:59:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 默认未启用:
|
|
|
|
|
|
|
|
|
|
-- 九宫格,手机用。
|
|
|
|
|
-- 在 engine/filters 增加 - lua_filter@t9_preedit
|
2023-05-16 16:21:36 +02:00
|
|
|
|
t9_preedit = require("t9_preedit")
|
|
|
|
|
|
2023-05-21 04:59:21 +02:00
|
|
|
|
-- 根据是否在用户词典,在结尾加上一个星号 *
|
|
|
|
|
-- 在 engine/filters 增加 - lua_filter@is_in_user_dict
|
|
|
|
|
-- 在方案里写配置项:
|
|
|
|
|
-- is_in_user_dict: true 为输入过的内容加星号
|
|
|
|
|
-- is_in_user_dict: flase 为未输入过的内容加星号
|
2023-05-08 10:42:21 +02:00
|
|
|
|
is_in_user_dict = require("is_in_user_dict")
|
2023-05-16 16:21:36 +02:00
|
|
|
|
|
2023-05-21 04:59:21 +02:00
|
|
|
|
-- 词条隐藏、降频
|
|
|
|
|
-- 在 engine/processors 增加 - lua_processor@cold_word_drop_processor
|
|
|
|
|
-- 在 engine/filters 增加 - lua_filter@cold_word_drop_filter
|
|
|
|
|
-- 在 key_binder 增加快捷键:
|
|
|
|
|
-- turn_down_cand: "Control+j" # 匹配当前输入码后隐藏指定的候选字词 或候选词条放到第四候选位置
|
|
|
|
|
-- drop_cand: "Control+d" # 强制删词, 无视输入的编码
|
2023-05-08 10:42:21 +02:00
|
|
|
|
cold_word_drop_processor = require("cold_word_drop.processor")
|
|
|
|
|
cold_word_drop_filter = require("cold_word_drop.filter")
|