aboutsummaryrefslogtreecommitdiff
path: root/plugins/settings.lua
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-06-01 23:01:12 -0400
committerjgmdev <jgmdev@gmail.com>2022-06-01 23:01:12 -0400
commit85c716be5e32a6f9c480ad3f58c7b70221582923 (patch)
tree85d185a78f4399261d0ea047083e60f1ea651b30 /plugins/settings.lua
parentd30a72bdb1dd815461745122c5a3523d1824c381 (diff)
downloadlite-xl-plugins-85c716be5e32a6f9c480ad3f58c7b70221582923.tar.gz
lite-xl-plugins-85c716be5e32a6f9c480ad3f58c7b70221582923.zip
fix wrong loading order of user enabled plugins
Diffstat (limited to 'plugins/settings.lua')
-rw-r--r--plugins/settings.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/settings.lua b/plugins/settings.lua
index bffb697..461463b 100644
--- a/plugins/settings.lua
+++ b/plugins/settings.lua
@@ -1411,15 +1411,6 @@ local core_run = core.run
function core.run()
store_default_keybindings()
- -- append all settings defined in the plugins spec
- scan_plugins_spec()
-
- -- merge custom settings into config
- merge_settings()
-
- ---@type settings.ui
- settings.ui = Settings()
-
-- load plugins disabled by default and enabled by user
if settings.config.enabled_plugins then
for name, _ in pairs(settings.config.enabled_plugins) do
@@ -1428,11 +1419,20 @@ function core.run()
and
not config.plugins[name]
then
- settings.ui:enable_plugin(name)
+ require("plugins." .. name)
end
end
end
+ -- append all settings defined in the plugins spec
+ scan_plugins_spec()
+
+ -- merge custom settings into config
+ merge_settings()
+
+ ---@type settings.ui
+ settings.ui = Settings()
+
-- apply user chosen color theme
if settings.config.theme then
core.reload_module("colors." .. settings.config.theme)