mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-15 23:39:27 +08:00
feat(nvim-plug): check hlexists
This commit is contained in:
parent
1e2b5afcf7
commit
25e3c692d4
5
bundle/nvim-plug/README.md
vendored
5
bundle/nvim-plug/README.md
vendored
@ -21,7 +21,8 @@
|
|||||||
|
|
||||||
## Intro
|
## 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
|
## 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.
|
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.
|
To enable plugin priority feature, you need to call `plug.load()` after `plug.add()` function.
|
||||||
|
10
bundle/nvim-plug/lua/plug/ui.lua
vendored
10
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())
|
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, build_context())
|
||||||
end
|
end
|
||||||
--- setup highlight
|
--- setup highlight
|
||||||
|
if vim.fn.hlexists('PlugTitle') == 0 then
|
||||||
vim.cmd('hi def link PlugTitle TODO')
|
vim.cmd('hi def link PlugTitle TODO')
|
||||||
|
end
|
||||||
|
if vim.fn.hlexists('PlugProcess') == 0 then
|
||||||
vim.cmd('hi def link PlugProcess Repeat')
|
vim.cmd('hi def link PlugProcess Repeat')
|
||||||
|
end
|
||||||
|
if vim.fn.hlexists('PlugDone') == 0 then
|
||||||
vim.cmd('hi def link PlugDone Type')
|
vim.cmd('hi def link PlugDone Type')
|
||||||
|
end
|
||||||
|
if vim.fn.hlexists('PlugFailed') == 0 then
|
||||||
vim.cmd('hi def link PlugFailed WarningMsg')
|
vim.cmd('hi def link PlugFailed WarningMsg')
|
||||||
|
end
|
||||||
|
if vim.fn.hlexists('PlugDoing') == 0 then
|
||||||
vim.cmd('hi def link PlugDoing Number')
|
vim.cmd('hi def link PlugDoing Number')
|
||||||
|
end
|
||||||
vim.fn.matchadd('PlugTitle', '^Plugins.*', 2, -1, { window = winid })
|
vim.fn.matchadd('PlugTitle', '^Plugins.*', 2, -1, { window = winid })
|
||||||
vim.fn.matchadd('PlugProcess', '^\\[\\zs=*', 2, -1, { window = winid })
|
vim.fn.matchadd('PlugProcess', '^\\[\\zs=*', 2, -1, { window = winid })
|
||||||
vim.fn.matchadd('PlugDone', '^√.*', 2, -1, { window = winid })
|
vim.fn.matchadd('PlugDone', '^√.*', 2, -1, { window = winid })
|
||||||
|
Loading…
Reference in New Issue
Block a user