From 5d7b6aa0550bdb0267111dfeaa6d234eab940c78 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 6 Feb 2025 12:15:56 +0800 Subject: [PATCH] docs(nvim-plug): update readme --- bundle/nvim-plug/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/bundle/nvim-plug/README.md b/bundle/nvim-plug/README.md index 5c2f54dca..93cd6e78b 100644 --- a/bundle/nvim-plug/README.md +++ b/bundle/nvim-plug/README.md @@ -62,7 +62,8 @@ require('plug').add({ ## Custom Plugin UI -The default is ui is inspired by [vundle](https://github.com/VundleVim/Vundle.vim), to setup cutom ui, you need to creat a on_update function, this function is called with two arges: +The default is ui is inspired by [vundle](https://github.com/VundleVim/Vundle.vim), to setup custom UI, +you need to creat a on_update function, this function is called with two arges: - name: `string` - date: `PlugUiData` @@ -71,6 +72,24 @@ The default is ui is inspired by [vundle](https://github.com/VundleVim/Vundle.vi | ------------ | ---------------------------------------- | | `clone_done` | boolead, is true when clone successfully | + +```lua +--- your custom UI + +local function on_ui_update(name, data) + -- logic +end + + +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 = on_ui_update, -- default ui is notify, use `default` for split window UI +}) +``` + + ## Feedback The development of this plugin is in [`SpaceVim/bundle/nvim-plug`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/nvim-plug) directory.