tonyfettes / coc-rime

Rime input method source for coc.nvim
https://www.npmjs.com/package/coc-rime
MIT License
28 stars 1 forks source link

[bug] completion disappear after some inputs #5

Open Freed-Wu opened 1 year ago

Freed-Wu commented 1 year ago

I use double_pinyin_mspy, nihk means nihao: screen-2022-11-15-20-25-12 screen-2022-11-15-20-25-24 disappear. screen-2022-11-15-20-25-37 screen-2022-11-15-20-25-48 disappear.

tonyfettes commented 1 year ago

Sorry for the late late reply. This might due to the debounce of coc.nvim and currently I'm not yet clear on how to solve it.

Freed-Wu commented 6 months ago

https://asciinema.org/a/648868

把 incomplete 改了可以暂时修复这个问题,但貌似又引入了新问题 :cry:

tonyfettes commented 6 months ago

我看了一下代码,感觉可能可以从 textEdit 方向入手...我现在用的是 mac 所以可能需要先装下 rime 然后适配一下 rime-cli 才能来看这里的逻辑...

https://github.com/tonyfettes/coc-rime/blame/dd1982f1fd190facad8760b29ca44040aa9fb6e6/src/index.ts#L154

不过我现在应该可能没你懂代码了hh,所以您看着来...

Freed-Wu commented 6 months ago

适配一下 rime-cli

应该不用,只要 pkg-config 能找到 json-c 和 librime , rime-cli 就会被自动构建在 build/Release/rime_cli 。 构建过程见 https://github.com/tonyfettes/coc-rime/blob/master/binding.gyp#L14

从 textEdit 方向

:+1:

Freed-Wu commented 6 months ago

rime-cli 就会被自动构建

单独构建 rime-cli server 不构建 js client 也是可以的。过程在 https://github.com/tonyfettes/coc-rime/blob/master/scripts/build.sh

server 也许可以被 https://github.com/nodejs/nan 代替,即像 https://github.com/DogLooksGood/emacs-rime/blob/master/lib.c 只是一个库,省去通信开销。但我还没研究那么深 :cry:

Freed-Wu commented 6 months ago

Screenshot from 2024-03-25 23-36-33

有的输入方案使用标点符号,比如 ; 就是 ing,恐怕扫描 inputString 时也要考虑进去。

tonyfettes commented 6 months ago

我在macOS上起了一个虚拟机才跑起来...不过我好像没有复现

https://asciinema.org/a/648868

这个问题。

不过在我的使用体验中,我好像输入几次以后补全就消失了,不知道您有没有遇见过这样的问题?

Freed-Wu commented 6 months ago

在macOS上起了一个虚拟机

我试过了在 Ubuntu, ArchLinux, Android Termux, NixOS 安装这个软件且没有问题。 macOS 的 homebrew 没有 librime ,不知道 squirrel 是啥能不能代替。不能就只能用 nix 了。https://search.nixos.org/packages?channel=23.11&show=rime-cli&from=0&size=50&sort=relevance&type=packages&query=rime 有 darwin (macOS) 的支持。

我好像输入几次以后补全就消失了

似乎 unexpected behaviour 又变了 :cry:

Freed-Wu commented 5 months ago

Can you enable pre-commit.ci? I don't have enough premission :cry:

Freed-Wu commented 5 months ago

And add https://www.npmjs.com/package/coc-rime to website?

Screenshot from 2024-04-18 22-39-06

Screenshot from 2024-04-18 22-37-48

tonyfettes commented 5 months ago

Can you enable pre-commit.ci? I don't have enough premission 😢

I have grant permission to install this app, but I'm not really sure if it works.

And add https://www.npmjs.com/package/coc-rime to website?

Done.