浏览代码

perf(plugins): move assert `vim.env.LVIM_DEV_MODE` logic (#3238)

2nthony 2 年之前
父节点
当前提交
e94390a922
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lua/lvim/plugins.lua

+ 2 - 2
lua/lvim/plugins.lua

@@ -297,8 +297,8 @@ local get_default_sha1 = function(spec)
   return default_sha1[short_name] and default_sha1[short_name].commit
 end
 
-for _, spec in ipairs(core_plugins) do
-  if not vim.env.LVIM_DEV_MODE then
+if not vim.env.LVIM_DEV_MODE then
+  for _, spec in ipairs(core_plugins) do
     -- Manually lock the commit hash since Packer's snapshots are unreliable in headless mode
     spec["commit"] = get_default_sha1(spec)
   end