lewis6991 / impatient.nvim

Improve startup time for Neovim
MIT License
1.19k stars 28 forks source link

Attempt to call a nil value when require from init.vim #7

Closed ecosse3 closed 3 years ago

ecosse3 commented 3 years ago

Hello,

for of all - thank you for this plugin. I love to improve speed of my neovim. Currently I have load time of 500ms with 72 plugins and want to improve it.

In my neovim I use both init.vim and init.lua because I am still refactoring it. So after installing it via packer in first line:

...
local use = packer.use

-- Packer can manage itself
use 'wbthomason/packer.nvim'

-- Needed to load first
use {'lewis6991/impatient.nvim', rocks = 'mpack'}
...

it correctly installed impatient.nvim and mpack. First I wanted to require it via packer by adding config = "require('impatient')" but it didn't work.

Now in my init.vim I added first line as

lua require('impatient')

but it throws such an errors and doesn't work:

Error detected while processing BufEnter Autocommands for "*":                                                                                                                                                                                                                                                                                  
E5108: Error executing lua .../site/pack/packer/start/impatient.nvim/lua/impatient.lua:113: attempt to call a nil value     
... (then after going to any file from startify):                                                                                                                                                                                                                    
E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'nvim-tree' 

Then also telescope.nvim and nvim-tree doesn't work at all.

I'm using the newest version of Neovim v0.6.0-dev+200-gb35de6c52. Any suggestions on how can I fix it?

ecosse3 commented 3 years ago

Fixed after :LuaCacheClear! Load time improved from 532.249ms to 423.334ms. Thanks 😄