Namespace plugin-specific configuration settings.

This commit is contained in:
Adam Harrison
2021-07-15 17:58:14 -04:00
parent d10865bcc4
commit e539310e6d
5 changed files with 14 additions and 10 deletions
+4 -2
View File
@@ -28,7 +28,9 @@ config.tab_close_button = true
-- Disable plugin loading setting to false the config entry
-- of the same name.
config.trimwhitespace = false
config.lineguide = false
config.plugins = {}
config.plugins.trimwhitespace = false
config.plugins.lineguide = false
return config
+1 -1
View File
@@ -712,7 +712,7 @@ function core.load_plugins()
local ls = refused_list[root_dir == USERDIR and 'userdir' or 'datadir'].plugins
ls[#ls + 1] = filename
end
if version_match and config[basename] ~= false then
if version_match and config.plugins[basename] ~= false then
local modname = "plugins." .. basename
local ok = core.try(require, modname)
if ok then core.log_quiet("Loaded plugin %q from %s", basename, plugin_dir) end