diff --git a/data/plugins/language_c.lua b/data/plugins/language/c.lua similarity index 100% rename from data/plugins/language_c.lua rename to data/plugins/language/c.lua diff --git a/data/plugins/language_css.lua b/data/plugins/language/css.lua similarity index 100% rename from data/plugins/language_css.lua rename to data/plugins/language/css.lua diff --git a/data/plugins/language/init.lua b/data/plugins/language/init.lua new file mode 100644 index 00000000..faf2acba --- /dev/null +++ b/data/plugins/language/init.lua @@ -0,0 +1,16 @@ +local core = require "core" + +local no_errors = true +local files = system.list_dir(EXEDIR .. "/data/plugins/language") +for _, filename in ipairs(files) do + local langname = filename:gsub(".lua$", "") + if langname ~= "init" then + local ok = core.try(require, "plugins.language." .. langname) + if ok then + core.log_quiet("Loaded language %q", langname) + else + no_errors = false + end + end +end +return no_errors diff --git a/data/plugins/language_js.lua b/data/plugins/language/js.lua similarity index 100% rename from data/plugins/language_js.lua rename to data/plugins/language/js.lua diff --git a/data/plugins/language_lua.lua b/data/plugins/language/lua.lua similarity index 100% rename from data/plugins/language_lua.lua rename to data/plugins/language/lua.lua diff --git a/data/plugins/language_md.lua b/data/plugins/language/md.lua similarity index 100% rename from data/plugins/language_md.lua rename to data/plugins/language/md.lua diff --git a/data/plugins/language_python.lua b/data/plugins/language/python.lua similarity index 100% rename from data/plugins/language_python.lua rename to data/plugins/language/python.lua diff --git a/data/plugins/language_xml.lua b/data/plugins/language/xml.lua similarity index 100% rename from data/plugins/language_xml.lua rename to data/plugins/language/xml.lua