Skip to content

guard plugin configurations

To prevent Lua errors when porting the configuration to another machine all plugin configurations should be "guarded".

-- Guarding the configuration and assign `plugin` for use in the configuration
local loaded,plugin = pcall(function() require('plugin') end)
if not loaded then return end

-- Configure Plugin
plugin.setup()

Doing it like this makes the plugin configuration independent from the plugin manager that is used.