Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wsdjeg committed Feb 5, 2025
1 parent a8d0ea5 commit 1fb5edd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions bundle/nvim-plug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
7 changes: 5 additions & 2 deletions bundle/nvim-plug/lua/plug/installer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1fb5edd

Please sign in to comment.