summaryrefslogtreecommitdiff
path: root/lua/lvim/core/lualine/styles.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-10-04 19:23:52 +0200
committerGitHub <[email protected]>2022-10-04 13:23:52 -0400
commite5bcf01c759e7c833d8a5f1fcf665b6ea32a7c16 (patch)
tree51b68c8face9faa2a41fcc8103b6296213557d4b /lua/lvim/core/lualine/styles.lua
parent560ee4d7cf4038a22a5556d79ad92cd226a792dc (diff)
refactor: more deliberate reload (#3133)
Diffstat (limited to 'lua/lvim/core/lualine/styles.lua')
-rw-r--r--lua/lvim/core/lualine/styles.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/lua/lvim/core/lualine/styles.lua b/lua/lvim/core/lualine/styles.lua
index 8cde37c4..81dbbabb 100644
--- a/lua/lvim/core/lualine/styles.lua
+++ b/lua/lvim/core/lualine/styles.lua
@@ -152,6 +152,14 @@ function M.update()
local style = M.get_style(lvim.builtin.lualine.style)
lvim.builtin.lualine = vim.tbl_deep_extend("keep", lvim.builtin.lualine, style)
+
+ local color_template = vim.g.colors_name or lvim.colorscheme
+ local theme_supported, template = pcall(function()
+ require("lualine.utils.loader").load_theme(color_template)
+ end)
+ if theme_supported and template then
+ lvim.builtin.lualine.options.theme = color_template
+ end
end
return M