diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-01-17 20:44:10 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-01-17 20:44:10 -0500 |
commit | 509858a44aedffebbbca37909c065ec0e4c5d2b5 (patch) | |
tree | 388f0af65f89cab378cf2e0e4e293dd485c33f07 /src/lpm.lua | |
parent | 02fea1ede8878fb2fa7b4708e11ef28b0b375152 (diff) | |
download | lite-xl-plugin-manager-509858a44aedffebbbca37909c065ec0e4c5d2b5.tar.gz lite-xl-plugin-manager-509858a44aedffebbbca37909c065ec0e4c5d2b5.zip |
Added list of core dependencies so we don't generate manifest rqeuirements for them.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r-- | src/lpm.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index 2467b55..c24d8f8 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -878,6 +878,12 @@ end -- in the cases where we don't have a manifest, assume generalized structure, take addons folder, trawl through it, build manifest that way -- assuming each .lua file under the `addons` folder is a addon. also parse the README, if present, and see if any of the addons +-- Ignore any requries that are in CORE_PLUGINS. +local CORE_PLUGINS = { + autocomplete = true, autoreload = true, contextmenu = true, detectindent = true, drawwhitespace = true, language_c = true, language_cpp = true, language_css = true, language_dart = true, + language_html = true, language_js = true, language_lua = true, language_md = true, language_python = true, language_xml = true, lineguide = true, linewrapping = true, macro = true, + projectsearch = true, quote = true, reflow = true, scale = true, tabularize = true, toolbarview = true, treeview = true, trimwhitespace = true, workspace = true +} function Repository:generate_manifest(repo_id) if not self.commit and not self.branch then error("requires an instantiation") end local path = self.local_path @@ -923,7 +929,7 @@ function Repository:generate_manifest(repo_id) local _, _, mod_version = line:find("%-%-.*mod%-version:%s*(%w+)") if mod_version then addon.mod_version = mod_version end local _, _, required_addon = line:find("require [\"']plugins.([%w_]+)") - if required_addon then if required_addon ~= addon.id then if not addon.dependencies then addon.dependencies = {} end addon.dependencies[required_addon] = ">=0.1" end end + if required_addon and not CORE_PLUGINS[required_addon] then if required_addon ~= addon.id then if not addon.dependencies then addon.dependencies = {} end addon.dependencies[required_addon] = ">=0.1" end end end if addon_map[addon.id] then addon = common.merge(addon, addon_map[addon.id]) |