From 481a2ba8dbcf03c3f457d3a07ac9848612df7cf6 Mon Sep 17 00:00:00 2001 From: mvllow Date: Tue, 24 Aug 2021 10:31:47 -0500 Subject: [PATCH] fix: `ColorScheme` autocmd skipped due to async --- lua/rose-pine/util.lua | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/lua/rose-pine/util.lua b/lua/rose-pine/util.lua index d1a7321..151f495 100644 --- a/lua/rose-pine/util.lua +++ b/lua/rose-pine/util.lua @@ -42,28 +42,19 @@ function util.load() local theme = require('rose-pine.theme') - local async - async = vim.loop.new_async(vim.schedule_wrap(function() - theme.load_terminal() + theme.load_terminal() - for group, colors in pairs(theme.treesitter) do - util.highlight(group, colors) - end - - for group, colors in pairs(theme.plugins) do - util.highlight(group, colors) - end - - async:close() - end)) - - -- load priority groups first for group, colors in pairs(theme.base) do util.highlight(group, colors) end - -- load enhancements (eg. treesitter, plugins) - async:send() + for group, colors in pairs(theme.treesitter) do + util.highlight(group, colors) + end + + for group, colors in pairs(theme.plugins) do + util.highlight(group, colors) + end end return util