Shewer Lu
Shewer Lu
這 code 是 使用 luarocks leveldb 的庫,在librime-lua 沒有加入 LevelDb api 前的版本 require 'leveldb' --
你使用的script ,移除 require 'leveldb' 可能就可以用了 function opendb() -- 是爲了解決重覆開啓 leveldb 的問題 如果沒有這問題,可以簡單一點 , 直接使用 LevelDb(...) ```lua local M = {} function M.init(env) env.db = LevelDb(..) end function M.fini(env) env.db:close() end...
> ``` > #! /usr/bin/env lua > -- > -- leveldb.lua > -- Copyright (C) 2022 Shewer Lu > -- > -- Distributed under terms of the MIT license. >...
```lua local function init_data(db) local tab = { ab = "于", cd = "金", ac = "金金", } for k,v in next,tab do db:update(k,v) end end ``` 你說明 result 也有上面的資料...
你的問題是 librime-lua LevelDb 失效 ,可是從測試看來 沒問題哇 要不你回方案作者問問
打 tag ([a-z]+)['")\]$ 可以參照 recognizer affix_segmentor 做個 lua_segmentor@*pair lua_filter@*pair
傳遞 KeyEvent repr() 字串 到前端處理 可用 commit_text 或 property_notifier commit_text("(){Left}")
trime 可以綁定 空白 左右滑動 == 方向鍵吧
```lua -- lua/navigator.lua -- 替換 engine/processors/lnavigator --> lua_processor@*navigator local M = {} function M.init(env) local ctx = env.engine.context if ctx:get_option("_horizontal") then -- 候選橫排 env.left = KeyEvent("Up") env.right= KeyEvent("Down") else --候選直排...
另一個script是移除 env.processor 把 lua_processor@*navigator 放在 navigator 前面