0

After starting nvim, the first opened file always shows blank, the second will be back to normal. This issue is out of nowhere.
OS:Arch
nvim: 0.7.2
terminal: kitty

Luxsis
  • 11
  • 2
  • Welcome to Vim :-) I'm afraid your question seems more a bug report than a real question. In order to help you we would need more information: about the symptom (a small screenshot would be helpful), the OS you are using, the version of Neovim that you are using, if you use the console version (nvim) of the GUI version (nvim-qt). Did you try to start nvim without considering the initialization nvim -u NONE -i NONE? – Vivian De Smedt Jul 15 '22 at 13:36
  • @Vivian De Smedt Thanks for your advice. Everything is ok when starts with initialization. How should I continue to locate the issue? – Luxsis Jul 15 '22 at 14:04
  • @Luxsis There are some tips here: https://vi.stackexchange.com/questions/2003/how-do-i-debug-my-vimrc-file. For Neovim substitute in init.vim/init.lua whereever it reads vimrc – Rich Jul 15 '22 at 14:32
  • @Luxsis, my advice is very generic :-| remove half of the configuration and verify is you still have the problem if not remove the other half and repeat the action with the faulty half such that you can find the part that is causing the problem :-|. If you share our startup files we could try to reproduce the problem and help you. – Vivian De Smedt Jul 15 '22 at 14:45
  • @Rich thanks for your advice – Luxsis Jul 15 '22 at 14:52
  • @VivianDeSmedt thanks for your help, it's solved now. – Luxsis Jul 15 '22 at 14:53

1 Answers1

1

I've found that this issue is caused by wrong argument in nvim.packer.
Before I set event="BufReadCmd"for lazy loading, then I changed to event="BufAdd".

I guess it's possible that loading package interrupts reading into buffer. Everything is back to noraml now.

Luxsis
  • 11
  • 2