1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

Improve plugin list ui

This commit is contained in:
wsdjeg 2017-01-21 22:21:15 +08:00
parent 7b63be8a3a
commit f27fc529de
4 changed files with 13 additions and 3 deletions

View File

@ -155,7 +155,10 @@ unite work flow leader can only be used in normal mode. unite leader need unite
#### Unite centric work-flow
- List all the plugins has been installed, fuzzy find what you want,
default action is open the github website of current plugin. default key is `<leader>lp`
![2016-12-29-22 31 27](https://cloud.githubusercontent.com/assets/13142418/21545996/c48d7728-ce16-11e6-8e30-0c72139f642f.png)
[layer name] [plugin name] [load type] [plugin options]
![2017-01-21_1358x725](https://cloud.githubusercontent.com/assets/13142418/22175019/ce42d902-e027-11e6-89cd-4f44f70a10cd.png)
- List all the mappings and description: `f<space>`
![2016-12-29-22 35 29](https://cloud.githubusercontent.com/assets/13142418/21546066/4896c5e2-ce17-11e6-8246-945b924df9aa.png)

View File

@ -1,5 +1,5 @@
function! SpaceVim#layers#chat#plugins() abort
return [
\ ['Shougo/denite.nvim',{ 'merged' : 0, 'loadconf' : 1}],
\ ['vim-chat/vim-chat',{ 'merged' : 0, 'loadconf' : 1}],
\ ]
endfunction

View File

@ -11,6 +11,7 @@ function! SpaceVim#plugins#load() abort
endfunction
function! s:load_plugins() abort
for group in g:spacevim_plugin_groups
let g:spacevim_plugin_layer = group
for plugin in s:getLayerPlugins(group)
if len(plugin) == 2
call zvim#plug#add(plugin[0], plugin[1])
@ -26,6 +27,9 @@ function! s:load_plugins() abort
endfor
call s:loadLayerConfig(group)
endfor
if exists('g:spacevim_plugin_layer')
unlet g:spacevim_plugin_layer
endif
for plugin in g:spacevim_custom_plugins
if len(plugin) == 2
call zvim#plug#add(plugin[0], plugin[1])

View File

@ -165,8 +165,11 @@ function! zvim#plug#add(repo,...) abort
exec "Plug '".a:repo."'"
endif
endif
let str = get(g:,'spacevim_plugin_layer', 'custom plugin')
let str = '[' . str . ']'
let str = str . repeat(' ', 25 - len(str))
exec 'call add(g:unite_source_menu_menus'
\ . '.AddedPlugins.command_candidates, ["['
\ . '.AddedPlugins.command_candidates, ["'. str . '['
\ . a:repo
\ . (len(a:000) > 0 ? (']'
\ . repeat(' ', 40 - len(a:repo))