I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater it's breakindent (and to some extent linebreak and scrolloff=2).
I ran some test of the form :Time norm 1000isomething * on a medium-size tex file (350 lines, 3400 words) with empty init.vim and these were the results:
- when
breakindentis off this takes less than 2s - with
breakindentthis takes 16s (same if I addso=2) - with
breakindentandlinebreakit's 22s - and if I add
so=2it increases further to 27s
For comparison, on vim the times follow a similar pattern but the slowest I get is 5s.
I feel like 27ms is a lot of time to process 10 input characters so it seems like something is wrong here? Is this a bug in neovim? Is this a known issue / is there anything I can do to make this faster?
I'm using Neovim 0.5.1 on Ubuntu.
* using the Time command fromtpope/vim-scriptease
:set wrap?