hoschi / yode-nvim

Yode plugin for NeoVim
MIT License
371 stars 3 forks source link

Input laggy in seditors #14

Open crispinb opened 1 year ago

crispinb commented 1 year ago

Typing is notably slow in seditors compared to normal editors/buffers. I haven't found this a problem with floating ones, as I've been using those mainly for reference. But it is a bit of a nuisance when using YodeCreateSeditorReplace, which I so far have used for narrowing down to just the section of code I wish to work on. It seems to be the case regardless of file type (ie. it's the same with both text and programming language buffers).

Is this to be expected, or should I be investigating possible interactions with other plugins?

hoschi commented 1 year ago

This isn't expected in none of both types, floating or as normal buffer. I have no problems with latency in my setup. There is also not much special about the buffer itself. expandtab is set as a workaround at the moment, but I can't think of a problem which only occurs in one of the two types of buffers.

crispinb commented 1 year ago

I've figured out what it is. It's not general lag after all - it's specifically a delay after hitting <Space>.

I set my mapleader to <Space>. I don't normally have any insert mode <Leader>* mappings, but yode-nvim adds buffer local mappings which include insert mode leader mappings. That's causing a delay every time I hit space.

I'm not sure how to work around this. I'll have to un- or re-map yode-nvim's buffer local mappings, but I don't know where to do that.

hoschi commented 1 year ago

I see. I'm going to provide a workaround and a fix for this.

hoschi commented 1 year ago

@crispinb please try the linked PR, more details there

hoschi commented 1 year ago

https://github.com/hoschi/yode-nvim/pull/15

crispinb commented 1 year ago

Thanks for the update! I'm away for a few days but will check it out when I return.

crispinb commented 1 year ago

I haven't been able to convince my plugin manager to install a specific commit. If it passes your testing you should probably assume it's all good. I may not have much chance in the near future to figure out what's going on.