From 1fb5edd9ee3756a18895dfd7b09ac5a06b1dfd12 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Feb 2025 22:38:14 +0800 Subject: [PATCH] update --- bundle/nvim-plug/README.md | 1 + bundle/nvim-plug/lua/plug/installer.lua | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bundle/nvim-plug/README.md b/bundle/nvim-plug/README.md index 9fdd319c34da..fbb1845d6762 100644 --- a/bundle/nvim-plug/README.md +++ b/bundle/nvim-plug/README.md @@ -14,6 +14,7 @@ require('plug').setup({ bundle_dir = 'D:/bundle_dir', max_processes = 5, -- max number of processes used for nvim-plug job base_url = 'https://github.com', + ui = 'notify', -- default ui is notify, use `default` for split window UI }) require('plug').add({ diff --git a/bundle/nvim-plug/lua/plug/installer.lua b/bundle/nvim-plug/lua/plug/installer.lua index 930f688bad4a..03e2ad7d6a1a 100644 --- a/bundle/nvim-plug/lua/plug/installer.lua +++ b/bundle/nvim-plug/lua/plug/installer.lua @@ -16,6 +16,9 @@ local on_uidate if config.ui == 'default' then on_uidate = require('plug.ui').on_update +elseif config.ui == 'notify' then + on_uidate = function(name, date) + end end local processes = 0 @@ -90,12 +93,12 @@ local function install_plugin(plugSpec) end, on_exit = function(id, data, single) if data == 0 and single == 0 then - notify.notify('Successfully installed ' .. jobs['jobid_' .. id]) + on_uidate(plugSpec.name, {downloaded = true, download_process = 100}) if plugSpec.build then build(plugSpec) end else - notify.notify('failed to install ' .. jobs['jobid_' .. id]) + on_uidate(plugSpec.name, {downloaded = false, download_process = 0}) end processes = processes - 1 if #installation_queue > 0 then