yode-nvim icon indicating copy to clipboard operation
yode-nvim copied to clipboard

Input laggy in seditors

Open crispinb opened this issue 2 years ago • 7 comments

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?

crispinb avatar Mar 18 '23 01:03 crispinb

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.

hoschi avatar Mar 18 '23 09:03 hoschi

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.

crispinb avatar Mar 18 '23 10:03 crispinb

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

hoschi avatar Mar 19 '23 18:03 hoschi

@crispinb please try the linked PR, more details there

hoschi avatar Apr 10 '23 10:04 hoschi

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

hoschi avatar Apr 10 '23 10:04 hoschi

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

crispinb avatar Apr 11 '23 07:04 crispinb

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.

crispinb avatar Apr 14 '23 05:04 crispinb