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 theme = require('rose-pine.theme')
|
||||||
|
|
||||||
local async
|
theme.load_terminal()
|
||||||
async = vim.loop.new_async(vim.schedule_wrap(function()
|
|
||||||
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
|
for group, colors in pairs(theme.base) do
|
||||||
util.highlight(group, colors)
|
util.highlight(group, colors)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- load enhancements (eg. treesitter, plugins)
|
for group, colors in pairs(theme.treesitter) do
|
||||||
async:send()
|
util.highlight(group, colors)
|
||||||
|
end
|
||||||
|
|
||||||
|
for group, colors in pairs(theme.plugins) do
|
||||||
|
util.highlight(group, colors)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return util
|
return util
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue