plugins: colorizer: Let colorizer handle the loading

This commit is contained in:
Akianonymus 2022-09-14 11:57:32 +05:30 committed by Aki
parent 83572cc15b
commit 74e374ef7b
1 changed files with 3 additions and 1 deletions

View File

@ -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()