diff options
author | kylo252 <[email protected]> | 2022-01-10 09:59:20 +0100 |
---|---|---|
committer | kylo252 <[email protected]> | 2022-01-10 09:59:20 +0100 |
commit | 579064b88119538d0a13edf798d1a4f8875b6472 (patch) | |
tree | fd40e3ddef76a83a4c96c03457e9834777379c0d /lua/lvim/utils | |
parent | 8fe7cf2fac461b2136e815e3107b434cd407a09d (diff) | |
parent | ec1e4140fa4156df50785da5d6297145762a7daa (diff) |
Merge branch 'rolling'
Diffstat (limited to 'lua/lvim/utils')
-rw-r--r-- | lua/lvim/utils/hooks.lua | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/lua/lvim/utils/hooks.lua b/lua/lvim/utils/hooks.lua index ab7dfacd..10c3eb20 100644 --- a/lua/lvim/utils/hooks.lua +++ b/lua/lvim/utils/hooks.lua @@ -5,33 +5,25 @@ local in_headless = #vim.api.nvim_list_uis() == 0 function M.run_pre_update() Log:debug "Starting pre-update hook" - if package.loaded["lspconfig"] then - vim.cmd [[ LspStop ]] - end end function M.run_pre_reload() Log:debug "Starting pre-reload hook" - if package.loaded["lspconfig"] then - vim.cmd [[ LspStop ]] - end end function M.run_on_packer_complete() - require("lvim.plugin-loader").recompile() - -- forcefully activate nvim-web-devicons - require("nvim-web-devicons").set_up_highlights() - if package.loaded["lspconfig"] then - vim.cmd [[ LspStart ]] - end + -- manually trigger event to fix colors + vim.cmd [[ doautocmd ColorScheme ]] Log:info "Reloaded configuration" end function M.run_post_reload() Log:debug "Starting post-reload hook" - - M.reset_cache() require("lvim.plugin-loader").ensure_installed() + M.reset_cache() + if package.loaded["lspconfig"] then + pcall(vim.cmd, "LspRestart") + end end ---Reset any startup cache files used by Packer and Impatient @@ -67,9 +59,6 @@ function M.run_post_update() end -- TODO: add a changelog vim.notify("Update complete", vim.log.levels.INFO) - if package.loaded["lspconfig"] then - vim.cmd [[ LspStart ]] - end end) end end |