From 74e374ef7be0dac71c8c7d6a16b4cc1b0ebcb2e5 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 14 Sep 2022 11:57:32 +0530 Subject: [PATCH] plugins: colorizer: Let colorizer handle the loading --- lua/plugins/configs/others.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index e0870d2..b9f95c2 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -82,7 +82,9 @@ M.colorizer = function() options = load_override(options, "NvChad/nvim-colorizer.lua") colorizer.setup(options) -- execute colorizer as soon as possible - return vim.tbl_isempty(options.filetypes or {}) or vim.cmd [[do FileType]] + vim.defer_fn(function() + require("colorizer").attach_to_buffer(0) + end, 0) end M.comment = function()