mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-19 08:33:44 +08:00
docs(nvim-plug): update readme
This commit is contained in:
parent
1611f8c274
commit
28fc69c56a
27
bundle/nvim-plug/README.md
vendored
27
bundle/nvim-plug/README.md
vendored
@ -104,17 +104,36 @@ The default highlight group.
|
|||||||
| -------------------- | ------------------------------- |
|
| -------------------- | ------------------------------- |
|
||||||
| `PlugTitle` | the first line of plugin window |
|
| `PlugTitle` | the first line of plugin window |
|
||||||
| `PlugProcess` | the process of downloading |
|
| `PlugProcess` | the process of downloading |
|
||||||
|
| `PlugDone` | clone/build/install done |
|
||||||
|
| `PlugFailed` | clone/build/install failed |
|
||||||
|
| `PlugDoing` | job is running |
|
||||||
|
|
||||||
|
Default highlight link:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
vim.cmd('hi def link PlugTitle TODO')
|
||||||
|
vim.cmd('hi def link PlugProcess Repeat')
|
||||||
|
vim.cmd('hi def link PlugDone Type')
|
||||||
|
vim.cmd('hi def link PlugFailed WarningMsg')
|
||||||
|
vim.cmd('hi def link PlugDoing Number')
|
||||||
|
```
|
||||||
|
|
||||||
## Custom Plugin UI
|
## Custom Plugin UI
|
||||||
|
|
||||||
To setup custom UI, you need to creat a on_update function, this function is called with two arges:
|
To setup custom UI, you need to creat a on_update function, this function is called with two arges, `name` and `plugUiData`.
|
||||||
|
|
||||||
- name: `string`
|
The plugUiData is table with following keys:
|
||||||
- date: `PlugUiData`
|
|
||||||
|
|
||||||
| key | description |
|
| key | description |
|
||||||
| ------------ | ---------------------------------------- |
|
| --------------- | ---------------------------------------------------- |
|
||||||
| `clone_done` | boolead, is true when clone successfully |
|
| `clone_done` | boolead, is true when clone successfully |
|
||||||
|
| `command` | string, clone, pull or build |
|
||||||
|
| `clone_process` | string, git clone progress, such as `16% (160/1000)` |
|
||||||
|
| `clone_done` | boolean, git clone exit status |
|
||||||
|
| `building` | boolean |
|
||||||
|
| `build_done` | boolean |
|
||||||
|
| `pull_done` | boolean |
|
||||||
|
| `pull_process` | string |
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
--- your custom UI
|
--- your custom UI
|
||||||
|
Loading…
Reference in New Issue
Block a user