Shewer Lu
Shewer Lu
我在 lua.cc luaL_setmetatable() 插入 cout 發現 同質性 metatable 會不會 註冊沒有用的metatable ? ``` 以上文 來說 "7LuaTypeIPKN4rime11KeySequenceEE" 無接口可調用 "7LuaTypeIPKN4rime11KeySequenceEE" 才可用的 ----- export_type: 7LuaTypeIN4rime7SegmentEE ----- export_type: 7LuaTypeIRN4rime7SegmentEE ----- export_type: 7LuaTypeIKN4rime7SegmentEE ----- export_type: 7LuaTypeIRKN4rime7SegmentEE...
ConfigList ConfigMap 都有提供 begin() end() 要如何實現 :iter() for i,v in configlist for k,v in configmap
code 看起來沒有問題,你的方案是如何配置的?? rime.lua and schema librime 是否安装librime-lua版 查看 rime log
```lua -- /lua/add_shi.lua local function add_shi(input) for cand in input:iter() do yield(cand) if cand.text:match("是$") then local text = cand.text:gsub("是$","时") -- 替换字尾 yield(Candidate("shi", cand.start, cand._end, text, cand.comment)) end end end return...
这部份涉略不深 只知遒是在 MemoryReg PhraseReg class stript_translator public memory , translator , translator_option Memory 是管理dictionary and user dict Memory:OnCommit SimpleCandidate -- input:iter() --> 或许是Phrase for cand in input:iter() do yield(cand) if...
嗯 input:iter() cand 是 Phrase 無法修改 cand.text 那就從 https://github.com/LEOYoon-Tsaw/Rime_collections/blob/master/Rime_description.md#%E4%B8%89translator 1~10[項關於造詞選項測試那個較適合 要動MemoryReg 可以看MemoryReg的範例 自行製作 lua_translator 直接調用 dictionary
local context=env.engine.context local ascii_mode=context:get_option("ascii_mode") context:set_option("ascii_mode" , not ascii_mode) local function toggle(key) local value=context:get_option(key) context:set_option(key, not value) end
按照 mac 版rime 的install.md 重編 , mac 版 2021/02 不可能支援 #80 後大約在2021/04 更新的。~~
方案1 把 keybindel 在 librime-lua 直接做一個 lua_keybind extend key_binder 新增 lua_func 調用 lua_state func 方案2 把 key_binder 包入 lua_process 方案3 librime keybind 調用 lua_state 方案 1 2 pr librime-lua 方案3...
工程有一點點大 全部寫在 一個 file 太長太亂 沒有其他輔助件 實在是非常長的線性程序