I’m using a similar setup to you, NixOS, vim_configurable, though I’m using it through home-manager and can’t say I’m experiencing any issues with help load time. Trying base vim doc, as well as from some of the plugins I use.
Perhaps you could elaborate a bit more on your configuration. Do you have a very large set of plugins? Maybe it’s related to your hardware or perhaps filesystem.
One other thought that comes to mind is back when I used pathogen to load plugins there was a step to compile or generate the help doc. I don’t think it applies exactly to this situation, but maybe it comes up faster on a second access to the doc?
If I’ve followed the trail correctly it looks like you’re using vim-plug in the customRC file you’re using. It probably works but it might be on contention with the plugin load style that vim_configurable uses. As it builds a custom path of and adds that to the packpath and runtimepath at the top of the vimrc it generates. Just a guess but that could be the cause of the slowness as maybe there are duplicates of some of your plugins in the runtime.
So the same set of plugins loaded with the Vim8 plugin loading style outside of NixOS does not have the issue with the help files coming up?
I’d also maybe check to see if it’s a particular plugin that causes the issue, maybe biset them, loading half of them and see if you have the issue with both halves, and narrow it down from there.
The last thing I can think of is if you look at the vim executable it’s actually a shell script that runs the binary with the custom vimrc file that it generates, but it loads the plugins before the customRC values are used. Maybe that will provide a clue for you. Mine starts with (some whitespace removed for bevity):
" configuration generated by NIX
filetype indent plugin on | syn on
My customRC follows that. So you might wish to put those vars you’re setting in the beforePlugins option instead of customRC. The pack dir contains all my plugins plus vim-sensible which is added by home-manager.
Not sure I’m helping much with the specific slowness issue here, but maybe knowing some more of the internals will help you figure it out.
Thanks, I really appreciate the help regardless! I don’t currently have access to a non-NixOS machine to reconfirm that the same set of plugins don’t cause the same issue on a non-nix vim, but I’ll try what you’ve suggested, starting with the bisect.