diff options
author | kylo252 <[email protected]> | 2021-11-29 09:12:13 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-29 09:12:13 +0100 |
commit | 8641c38c862d3e9818791673a9366831b81ff603 (patch) | |
tree | c6254b89ccbd1d1d56593f80ec6bf4a0deaec9d4 /lua/lvim/utils/init.lua | |
parent | 3a2367b7065f617cf47278912475a517981ec248 (diff) |
fix(nvimtree): update settings (#2001)
Diffstat (limited to 'lua/lvim/utils/init.lua')
-rw-r--r-- | lua/lvim/utils/init.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lua/lvim/utils/init.lua b/lua/lvim/utils/init.lua index d7affd4b..8c0ad036 100644 --- a/lua/lvim/utils/init.lua +++ b/lua/lvim/utils/init.lua @@ -193,12 +193,16 @@ function utils.generate_plugins_sha(output) return ret, stdout end - for name, plugin in pairs(_G.packer_plugins) do - local retval, latest_sha = git_cmd { "-C", plugin.path, "rev-parse", "@{-1}" } + local core_plugins = require "lvim.plugins" + for _, plugin in pairs(core_plugins) do + local name = plugin[1]:match "/(%S*)" + local url = "https://github.com/" .. plugin[1] + print("checking: " .. name .. ", at: " .. url) + local retval, latest_sha = git_cmd { "ls-remote", url, "origin", "HEAD" } if retval == 0 then -- replace dashes, remove postfixes and use lowercase local normalize_name = (name:gsub("-", "_"):gsub("%.%S+", "")):lower() - list[normalize_name] = latest_sha[1] + list[normalize_name] = latest_sha[1]:gsub("\tHEAD", "") end end utils.write_file(output, "local commits = " .. vim.inspect(list), "w") |