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/plugins.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lua/plugins.lua') diff --git a/lua/plugins.lua b/lua/plugins.lua index 33efdf05..22132956 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -94,7 +94,11 @@ return require("packer").startup(function(use) "terrortylor/nvim-comment", cmd = "CommentToggle", config = function() - require("nvim_comment").setup() + local status_ok, nvim_comment = pcall(require, "nvim_comment") + if not status_ok then + return + end + nvim_comment.setup() end, } @@ -145,8 +149,8 @@ return require("packer").startup(function(use) "norcalli/nvim-colorizer.lua", event = "BufRead", config = function() - require("colorizer").setup() - vim.cmd "ColorizerReloadAllBuffers" + require "lv-colorizer" + -- vim.cmd "ColorizerReloadAllBuffers" end, disable = not O.plugin.colorizer.active, } -- cgit v1.2.3