vim-lexical icon indicating copy to clipboard operation
vim-lexical copied to clipboard

Lags while typing if lexical is active

Open duckpuppy opened this issue 7 years ago • 2 comments

I have lexical enabled for markdown and text files, along with litecorrect. Everything works as long as I don't pause typing for too long. If I do pause mid-word, lexical will cause a 5-10 second hang.

For example, I can type th<space> quickly with no problems, but if I pause between th and <space>, then vim will hang for about 5 seconds before the space appears. I can reproduce this 100% of the time in that scenario - just pause for a quick 3-count between the th and <space>. The problem will occasionally happen while backspacing over text as well when I have partially deleted a word.

I have NeoComplete installed, and I've seen that issues can arise with that combo, but even after calling NeoCompleteDisable on the buffer I get the above behavior. I have a fairly complex vimrc, so I'm trying to narrow down if it's another interaction between plugins as I get the chance.

duckpuppy avatar Aug 07 '16 20:08 duckpuppy

Using a minimal vimrc (as in this gist), I can't reliably reproduce the problem. There's an interaction with something else causing this or making it happen more often, but disabling lexical does stop it from happening at all. It may take a while for me to continue tracking this down.

UPDATE: It seems that it is NeoComplete causing this. I can't reproduce it until I enable NeoComplete, and then it's 100%. Note that just disabling NeoComlete using NeoCompleteDisable isn't enough - I have to not load the plugin at all in order to get rid of the problem.

UPDATE 2: It does seem that NeoCompleteDisable works, but only if ran after the buffer is loaded. It doesn't work if it's in an autocommand at all, from what I can tell. I tried both FileType markdown NeoCompleteDisable and BufRead,BufNewFile *.markdown,*.md NeoCompleteDisable and neither worked.

duckpuppy avatar Aug 07 '16 21:08 duckpuppy

Issue #11 deals with better integration with neocomplete.

I won't get a chance to work on it anytime soon, but welcome others to investigate and submit a pull request.

reedes avatar Aug 08 '16 01:08 reedes