Closed cworld1 closed 2 months ago
能不能改成这样:
C.default_command
是一个 table:
local C = {
-- im-select binary's name, or the binary's full path
default_command = { "im-select.exe" },
config.default_command
则两种都支持
default_command = 'im-select.exe',
)default_command = { "AIMSwitcher.exe," "--im" }
,或者 default_command = { "im-select.exe" }
然后在函数 set_opts
里做一下判断,如果用户给 default_command
传入的是 string,就拼成一个 table 设置到 default_command
,如果用户设置的是 table,则直接使用用户的 table,这样的好处是兼容以前的配置,且不用加新的参数
当然,其他用到 default comamnd 的地方也需要一并修改
我觉得可以试试。可能需要一些时间,最近可较忙
ok 改完了,这下都可以了应该
mac端测了下原生im-select也没问题,这下兼容了
嗯..感觉这个方案跟pattern各有优劣吧,写了很多 cmd[1]
🥲
It should give a config to custom pattern, not just give it to plugin itself to find it. It is the difficulty for me to use AIMSwitcher (which support windows input method mode), which need a specific pattern
--imm
.