mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
fix: ColorScheme autocmd skipped due to async
This commit is contained in:
parent
ce6f25e13b
commit
481a2ba8db
1 changed files with 8 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue