From 716f127e95b71bdc1f1ebb960b381ba50b10c1fe Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Jul 2021 20:42:29 -0400 Subject: wrap requires in pcall --- lua/lv-colorizer/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua/lv-colorizer/init.lua') diff --git a/lua/lv-colorizer/init.lua b/lua/lv-colorizer/init.lua index ac5f1356..abe2f728 100644 --- a/lua/lv-colorizer/init.lua +++ b/lua/lv-colorizer/init.lua @@ -1,4 +1,8 @@ -require("colorizer").setup({ "*" }, { +local status_ok, colorizer = pcall(require, "colorizer") +if not status_ok then + return +end +colorizer.setup({ "*" }, { RGB = true, -- #RGB hex codes RRGGBB = true, -- #RRGGBB hex codes RRGGBBAA = true, -- #RRGGBBAA hex codes -- cgit v1.2.3