From 0309cc0f87ac1d10d5e69028e1b9c0c8c6bd1fc9 Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 22 Oct 2021 20:38:18 +0200 Subject: schedule LspUninstallAll i/o for more snappiness --- lua/nvim-lsp-installer.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lua/nvim-lsp-installer.lua') diff --git a/lua/nvim-lsp-installer.lua b/lua/nvim-lsp-installer.lua index 5c41864d..81899a2c 100644 --- a/lua/nvim-lsp-installer.lua +++ b/lua/nvim-lsp-installer.lua @@ -53,11 +53,13 @@ function M.uninstall_all() end if choice == 1 then log.info "Uninstalling all servers." - if fs.dir_exists(settings.current.install_root_dir) then - fs.rmrf(settings.current.install_root_dir) - end - status_win().mark_all_servers_uninstalled() status_win().open() + vim.schedule(function() + if fs.dir_exists(settings.current.install_root_dir) then + fs.rmrf(settings.current.install_root_dir) + status_win().mark_all_servers_uninstalled() + end + end) else print "Uninstalling all servers was aborted." end -- cgit v1.2.3-70-g09d2