mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-14 01:37:58 +08:00
feat(nvim-plug): check hlexists
This commit is contained in:
parent
1e2b5afcf7
commit
25e3c692d4
7
bundle/nvim-plug/README.md
vendored
7
bundle/nvim-plug/README.md
vendored
@ -14,14 +14,15 @@
|
||||
- [Commands](#commands)
|
||||
- [Default UI](#default-ui)
|
||||
- [Custom Plugin UI](#custom-plugin-ui)
|
||||
- [Plugin priority](#plugin-priority)
|
||||
- [Plugin priority](#plugin-priority)
|
||||
- [Feedback](#feedback)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Intro
|
||||
|
||||
nvim-plug is an asynchronous Neovim plugin manager written in Lua. There is also a [Chinese introduction](https://wsdjeg.net/neovim-plugin-manager-nvim-plug/) about nvim-plug.
|
||||
nvim-plug is an asynchronous Neovim plugin manager written in Lua.
|
||||
There is also a [Chinese introduction](https://wsdjeg.net/neovim-plugin-manager-nvim-plug/) about this plugin.
|
||||
|
||||
## Features
|
||||
|
||||
@ -184,7 +185,7 @@ require('plug').setup({
|
||||
})
|
||||
```
|
||||
|
||||
### Plugin priority
|
||||
## Plugin priority
|
||||
|
||||
By default this feature is disabled, plugins will be loaded when run `add({plugins})` function.
|
||||
To enable plugin priority feature, you need to call `plug.load()` after `plug.add()` function.
|
||||
|
20
bundle/nvim-plug/lua/plug/ui.lua
vendored
20
bundle/nvim-plug/lua/plug/ui.lua
vendored
@ -101,11 +101,21 @@ M.open = function()
|
||||
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, build_context())
|
||||
end
|
||||
--- setup highlight
|
||||
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')
|
||||
if vim.fn.hlexists('PlugTitle') == 0 then
|
||||
vim.cmd('hi def link PlugTitle TODO')
|
||||
end
|
||||
if vim.fn.hlexists('PlugProcess') == 0 then
|
||||
vim.cmd('hi def link PlugProcess Repeat')
|
||||
end
|
||||
if vim.fn.hlexists('PlugDone') == 0 then
|
||||
vim.cmd('hi def link PlugDone Type')
|
||||
end
|
||||
if vim.fn.hlexists('PlugFailed') == 0 then
|
||||
vim.cmd('hi def link PlugFailed WarningMsg')
|
||||
end
|
||||
if vim.fn.hlexists('PlugDoing') == 0 then
|
||||
vim.cmd('hi def link PlugDoing Number')
|
||||
end
|
||||
vim.fn.matchadd('PlugTitle', '^Plugins.*', 2, -1, { window = winid })
|
||||
vim.fn.matchadd('PlugProcess', '^\\[\\zs=*', 2, -1, { window = winid })
|
||||
vim.fn.matchadd('PlugDone', '^√.*', 2, -1, { window = winid })
|
||||
|
Loading…
Reference in New Issue
Block a user