Skip to content

Commit

Permalink
fix(小鹤双拼): 修复触发字与key_binder冲突问题
Browse files Browse the repository at this point in the history
Co-Authored-By: mirtlecn <76689045+mirtlecn@users.noreply.github.com>
  • Loading branch information
Mintimate and mirtlecn committed Mar 27, 2024
1 parent afd7d6c commit 0779f6e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/auxCode_filter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

local AuxFilter = {}

local function alt_lua_punc( s )
return s:gsub( '([%.%+%-%*%?%[%]%^%$%(%)%%])', '%%%1' )
end

-- 日志模块
-- local log = require 'log'
-- log.outfile = "aux_code.log"
Expand All @@ -20,6 +24,9 @@ function AuxFilter.init(env)

-- 設定預設觸發鍵為分號,並從配置中讀取自訂的觸發鍵
env.trigger_key = config:get_string("axu_code/trigger_word") or ";"
-- 对内容进行替换
env.trigger_key = alt_lua_punc( env.trigger_key )

-- 设定是否显示辅助码,默认为显示
env.show_aux_notice = config:get_string("axu_code/show_aux_notice") or 'always'

Expand Down

0 comments on commit 0779f6e

Please sign in to comment.