keaising / im-select.nvim

Switch Input Method automatically depends on Neovim's edit mode
MIT License
170 stars 25 forks source link

feat: add pattern support #26

Closed cworld1 closed 2 months ago

cworld1 commented 4 months ago

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.

keaising commented 3 months ago

能不能改成这样:

然后在函数 set_opts 里做一下判断,如果用户给 default_command 传入的是 string,就拼成一个 table 设置到 default_command,如果用户设置的是 table,则直接使用用户的 table,这样的好处是兼容以前的配置,且不用加新的参数

当然,其他用到 default comamnd 的地方也需要一并修改

cworld1 commented 3 months ago

我觉得可以试试。可能需要一些时间,最近可较忙

cworld1 commented 2 months ago

ok 改完了,这下都可以了应该

cworld1 commented 2 months ago

mac端测了下原生im-select也没问题,这下兼容了

cworld1 commented 2 months ago

嗯..感觉这个方案跟pattern各有优劣吧,写了很多 cmd[1] 🥲