From fe95dffe41455139898f2125b176a76a97331c95 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 3 Dec 2021 18:56:31 +0100 Subject: fix: no restart required when changing colorscheme (#2026) --- init.lua | 3 --- lua/lvim/plugin-loader.lua | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 3a1457e1..cd7c6598 100644 --- a/init.lua +++ b/init.lua @@ -15,9 +15,6 @@ require("lvim.plugin-loader").load { plugins, lvim.plugins } local Log = require "lvim.core.log" Log:debug "Starting LunarVim" -vim.g.colors_name = lvim.colorscheme -- Colorscheme must get called after plugins are loaded or it will break new installs. -vim.cmd("colorscheme " .. lvim.colorscheme) - local commands = require "lvim.core.commands" commands.load(commands.defaults) diff --git a/lua/lvim/plugin-loader.lua b/lua/lvim/plugin-loader.lua index 1ad4266b..5bde8b1b 100644 --- a/lua/lvim/plugin-loader.lua +++ b/lua/lvim/plugin-loader.lua @@ -83,6 +83,10 @@ function plugin_loader.load(configurations) Log:warn "problems detected while loading plugins' configurations" Log:trace(debug.traceback()) end + + -- Colorscheme must get called after plugins are loaded or it will break new installs. + vim.g.colors_name = lvim.colorscheme + vim.cmd("colorscheme " .. lvim.colorscheme) end function plugin_loader.get_core_plugins() -- cgit v1.2.3