dstein64 / vim-startuptime

A plugin for profiling Vim and Neovim startup time.
MIT License
585 stars 11 forks source link

Not working in neovim 0.7.0 #13

Closed abhishek-1131 closed 2 years ago

abhishek-1131 commented 2 years ago

The :StartupTime command just opens a horizontal split with # vim-startuptime Running: [0%] nothing happens afterwards, it remains on 0%

First few lines from :version

NVIM v0.7.0 Build type: Release LuaJIT 2.1.0-beta3 Compiled by brew@HMBRW-A-001-M1-004.local

Can't figure out how to debug this, any help would be appreciated, thanks!

dstein64 commented 2 years ago

Thanks for reporting the issue @abhishek-1131!

If you start a terminal in Neovim with :terminal, and then launch another Neovim instance within the terminal, does Neovim start up without any error and/or request for input? If you're seeing Press ENTER or type command to continue, entering :messages within the nested Neovim should report the error that was encountered.

The reason I ask is because vim-startuptime measures startup time by asynchronously running Neovim with the --startuptime argument. If there is a request for user input (e..g, Press ENTER) then the process will get stuck on [0%].

abhishek-1131 commented 2 years ago

There was an (nvim-tree) error lurking around indeed, which was interrupting the process, like you mentioned. Works perfectly now, thanks!

dstein64 commented 2 years ago

I've added the following text to the progress screen, shown when progress is at 0%, in case others encounter this same issue:

Is vim-startuptime stuck on 0% progress?

  The plugin measures startuptime by asynchronously running (n)vim
  with the --startuptime argument. If there is a request for user
  input (e.g., "Press ENTER"), then processing will get stuck at 0%.

  To investigate further, try starting a terminal with :terminal, and
  launching a nested instance of (n)vim. If you see "Press ENTER or
  type command to continue" or some other message interfering with
  ordinary startup, this could be problematic for vim-startuptime.
  Running :messages within the nested (n)vim may help identify the
  issue.

  Try running vim-startuptime again once the problem is avoided via a
  configuration update.

https://github.com/dstein64/vim-startuptime/commit/a8ab56f30c603f8022f5fb6a436f5183beeb7b27