weasel icon indicating copy to clipboard operation
weasel copied to clipboard

Snippet not Work based on TextMate syntax

Open RaidOpe opened this issue 2 years ago • 5 comments

上报前请检查

  • [ x ] 我遇到的问题没有其他人在 issue 里提到过
  • [ ] 我的小狼毫版本于 rime/weasel 下载
  • [ x ] 我在使用小狼毫的最新发布版本,或最新发布版本后的 CI 构建

操作系统信息

  • OS 详细版本: [ 运行 winver.exe 获取,如 Windows 11 22H2 22621.3007]
  • 小狼毫版本: nightly

描述遇到的问题 文字被吞了

复现步骤 重现问题的步骤,如:

  1. 制定樣式
  2. 呼出,准备引用
  3. 进行并行输入
  4. 小狼吞了文字,但微软输入法正常

预期行为 小狼能够输入样式

用户文件 应该无关输入法文件,因为我用原始的朙月依旧如此

截图 小狼 test

微软 test2

RaidOpe avatar Feb 02 '24 13:02 RaidOpe

看样子是插入空格的时候就响应了,设定 inline_preedit: true 呢?

# weasel.custom.yaml
patch:
  "style/inline_preedit": true

mirtlecn avatar Feb 03 '24 01:02 mirtlecn

生效了,但貌似前一个词组要下一个键输入才转换 test3

RaidOpe avatar Feb 03 '24 02:02 RaidOpe

我找不到你说的软件来测试,TextMate 只看到了 mac 版本。

不过光看图,我猜测是上屏编码含空格的原因:Rime 很多方案里编码上屏的时候音节之间会多加个空格,可能是这个特性的问题。

找到你在用的输入方案,改下 preedit 试试:

# luna.schema.yaml
translator:
  # other items
  preedit_format: 
    - xform/ /'/
    # other rules

或者 改个补丁

# luna.custom.yaml
patch:
  "translator/preedit_format/@before 0": xform/ /'/

mirtlecn avatar Feb 03 '24 02:02 mirtlecn

编辑器源代码

0.0没学过Javascript,这个是Electron框架的软件,doc上声称使用了TextMate的语句,并且像VSC那样使用

我添加了如下配置,结果还是失败。 image

RaidOpe avatar Feb 03 '24 03:02 RaidOpe

test4 始终觉得小狼的判断出了点问题。微软输入法直接放口

RaidOpe avatar Feb 03 '24 03:02 RaidOpe