himalaya icon indicating copy to clipboard operation
himalaya copied to clipboard

Making the vim plugin async by using jobstart()

Open erietz opened this issue 4 years ago • 3 comments

Any thoughts on making this function

https://github.com/soywod/himalaya/blob/b9a9d0e6878972071c748e5ed93353b6e486abc9/vim/autoload/himalaya/shared/cli.vim#L4

async by using jobstart() rather than system()?

Every time it is called in this file

https://github.com/soywod/himalaya/blob/b9a9d0e6878972071c748e5ed93353b6e486abc9/vim/autoload/himalaya/msg.vim#L3

vim gets blocked. I could work on a PR for this.

erietz avatar Oct 22 '21 01:10 erietz

Never mind. This looks challenging since you would have to write a bunch of callback functions.

erietz avatar Oct 22 '21 02:10 erietz

In fact, I find your remark really pertinent. I already wrote some code related to jobs that works for both vim and neovim (https://github.com/soywod/iris.vim/tree/master/autoload/iris/job), I could reuse it for himalaya. I reopen the issue!

soywod avatar Oct 22 '21 09:10 soywod

Cool, it looks like you got all of the stdout buffing figured out. I remember it was a bit of a pain the last time I had to look at it.

P.S. I replied directy to this message in neovim with Himalaya ;)

On 22 Oct 2021, at 09:23, soywod/himalaya wrote:

In fact, I find your remark really pertinent. I already wrote some code related to jobs that works for both vim and neovim (https://github.com/soywod/iris.vim/tree/master/autoload/iris/job), I could reuse it for himalaya. I reopen the issue!

-- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/soywod/himalaya/issues/230#issuecomment-949445798

--

Regards,

Ethan Rietz

erietz avatar Oct 22 '21 21:10 erietz

I finally took time to do it (1 year after :sweat_smile:), it is available on the new repo at https://git.sr.ht/~soywod/himalaya-vim (commit a26044).

soywod avatar Oct 11 '22 19:10 soywod

On 11 Oct 2022, at 14:07 (-0500), soywod/himalaya wrote:

I finally took time to do it (1 year after :sweat_smile:), it is available on the new repo at https://git.sr.ht/~soywod/himalaya-vim.

-- Reply to this email directly or view it on GitHub: https://github.com/soywod/himalaya/issues/230#issuecomment-1275149820 You are receiving this because you modified the open/close state.

Message ID: @.***>

Awesome, I had completely forgotten about this project.

-- Regards,

Ethan Rietz (a happy himalaya customer) '

erietz avatar Oct 16 '22 00:10 erietz

Awesome, I had completely forgotten about this project.

It's still there, growing well :slightly_smiling_face: going toward a production-ready version!

soywod avatar Oct 16 '22 07:10 soywod