diff options
author | kylo252 <[email protected]> | 2021-10-03 23:02:42 +0200 |
---|---|---|
committer | kylo252 <[email protected]> | 2021-10-03 23:02:42 +0200 |
commit | 1078f43a517d5a0056b1191aca0fa85994a38ecb (patch) | |
tree | e284ea1e914915f984ab97bb8a7a6759461aedcb | |
parent | 7a939ad771403e20341c9465af66573d225300bb (diff) |
fix: add packer-install hook on lvim-update
-rw-r--r-- | lua/bootstrap.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lua/bootstrap.lua b/lua/bootstrap.lua index fb2099ce..43ce44d5 100644 --- a/lua/bootstrap.lua +++ b/lua/bootstrap.lua @@ -1,5 +1,7 @@ local M = {} +local in_headless = #vim.api.nvim_list_uis() == 0 + ---Join path segments that were passed as input ---@return string function _G.join_paths(...) @@ -114,10 +116,13 @@ function M:update() M:update_repo() M:reset_cache() require("lsp.templates").generate_templates() - vim.schedule(function() - -- TODO: add a changelog - vim.notify("Update complete", vim.log.levels.INFO) - end) + if not in_headless then + vim.schedule(function() + require("packer").install() + -- TODO: add a changelog + vim.notify("Update complete", vim.log.levels.INFO) + end) + end end local function git_cmd(subcmd) |