lewis6991 / impatient.nvim

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

fix: Handle syntax errors in required file #8

Closed shadmansaleh closed 3 years ago

shadmansaleh commented 3 years ago

If the required file has syntax errors then loadfile will return nil, error. That nil is directly passed to string.dump which throws a nil error and the syntax error is lost.

This adds a check so that doesn't happen

A simple way test is to have a file with a syntax error like

print("hello"

And try to require it.

@lewis6991 this is the issue that I mentioned earlier in matrix.

lewis6991 commented 3 years ago

Thanks