nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.81k stars 461 forks source link

fix: Use package.loaded instead of require to check if oil exists #1275

Closed polirritmico closed 2 weeks ago

polirritmico commented 3 weeks ago

Fix #1274

The PR avoids loading the plugin to check its availability by simply verifying if oil is in the package.loaded table. Since its already loaded it uses require directly instead of a protected call.