perf: remove async loading
This commit is contained in:
parent
825936964b
commit
6e1d4c2f37
@ -1,9 +1,9 @@
|
||||
" clear cache so this reloads changes.
|
||||
" useful for development
|
||||
lua package.loaded['tokyonight'] = nil
|
||||
lua package.loaded['tokyonight.theme'] = nil
|
||||
lua package.loaded['tokyonight.colors'] = nil
|
||||
lua package.loaded['tokyonight.util'] = nil
|
||||
lua package.loaded['tokyonight.config'] = nil
|
||||
" lua package.loaded['tokyonight'] = nil
|
||||
" lua package.loaded['tokyonight.theme'] = nil
|
||||
" lua package.loaded['tokyonight.colors'] = nil
|
||||
" lua package.loaded['tokyonight.util'] = nil
|
||||
" lua package.loaded['tokyonight.config'] = nil
|
||||
|
||||
lua require('tokyonight').colorscheme()
|
||||
|
@ -223,22 +223,18 @@ end
|
||||
---@param theme Theme
|
||||
function util.load(theme)
|
||||
vim.cmd("hi clear")
|
||||
if vim.fn.exists("syntax_on") then
|
||||
vim.cmd("syntax reset")
|
||||
end
|
||||
-- if vim.fn.exists("syntax_on") then
|
||||
-- vim.cmd("syntax reset")
|
||||
-- end
|
||||
|
||||
vim.o.termguicolors = true
|
||||
vim.g.colors_name = "tokyonight"
|
||||
-- vim.api.nvim__set_hl_ns(ns)
|
||||
-- load base theme
|
||||
util.syntax(theme.base)
|
||||
|
||||
-- load syntax for plugins and terminal async
|
||||
vim.defer_fn(function()
|
||||
util.terminal(theme.colors)
|
||||
util.syntax(theme.plugins)
|
||||
util.terminal(theme.colors)
|
||||
util.autocmds(theme.config)
|
||||
end, 0)
|
||||
end
|
||||
|
||||
---@param config Config
|
||||
|
Loading…
Reference in New Issue
Block a user