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

Fix dein support (#3647)

close #3513
This commit is contained in:
Wang Shidong 2020-07-19 10:47:58 +08:00 committed by GitHub
parent ca735648ba
commit 8c3d1d8281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 29 additions and 16 deletions

View File

@ -972,7 +972,7 @@ let g:spacevim_disabled_plugins = []
" Add custom plugins.
" >
" [[custom_plugins]]
" name = 'vimwiki/vimwiki'
" repo = 'vimwiki/vimwiki'
" merged = false
" <

View File

@ -114,7 +114,19 @@ function! SpaceVim#custom#apply(config, type) abort
endfor
let custom_plugins = get(a:config, 'custom_plugins', [])
for plugin in custom_plugins
call add(g:spacevim_custom_plugins, [plugin.name, plugin])
" name is an option for dein, we need to use repo instead
" but we also need to keep backward compatible!
" this the first argv should be get(plugin, 'repo', get(plugin, 'name',
" ''))
" BTW, we also need to check if the plugin has name or repo key
if has_key(plugin, 'name')
call add(g:spacevim_custom_plugins, [plugin.name, plugin])
elseif has_key(plugin, 'repo')
call add(g:spacevim_custom_plugins, [plugin.repo, plugin])
else
call SpaceVim#logger#warn('custom_plugins should contains repo key!')
call SpaceVim#logger#info(string(plugin))
endif
endfor
let bootstrap_before = get(options, 'bootstrap_before', '')
let g:_spacevim_bootstrap_after = get(options, 'bootstrap_after', '')

View File

@ -3181,7 +3181,7 @@ CUSTOM_PLUGINS *SpaceVim-usage-custom_plugins*
Add custom plugins.
>
[[custom_plugins]]
name = 'vimwiki/vimwiki'
repo = 'vimwiki/vimwiki'
merged = false
<

View File

@ -235,7 +235,7 @@ SpaceVim 根据需要定义了很多临时快捷键,这可以避免需要重
```toml
[[custom_plugins]]
name = "lilydjwg/colorizer"
repo = "lilydjwg/colorizer"
on_cmd = ["ColorHighlight", "ColorToggle"]
merged = false
```
@ -368,7 +368,7 @@ SpaceVim 的[模块首页](../layers/)。
```toml
[[custom_plugins]]
name = 'wsdjeg/neomake.vim'
repo = 'wsdjeg/neomake.vim'
# note: you need to disable merged feature
merged = false
```

View File

@ -64,7 +64,7 @@ colorscheme 模块为 SpaceVim 提供了一系列常用的颜色主题,默认
# 添加自定义主题https://github.com/mhartington/oceanic-next
[[custom_plugins]]
name = "mhartington/oceanic-next"
repo = "mhartington/oceanic-next"
merged = 0
```

View File

@ -120,7 +120,7 @@ SpaceVim 的默认配置文件为 `~/.SpaceVim.d/init.toml`。下面为一简单
# 添加自定义插件
[[custom_plugins]]
name = "lilydjwg/colorizer"
repo = "lilydjwg/colorizer"
merged = false
```

View File

@ -244,9 +244,9 @@ If you want to add plugins from github, just add the repo name to the `custom_pl
```toml
[[custom_plugins]]
name = "lilydjwg/colorizer"
on_cmd = ["ColorHighlight", "ColorToggle"]
merged = false
repo = "lilydjwg/colorizer"
on_cmd = ["ColorHighlight", "ColorToggle"]
merged = false
```
`on_cmd` option means this plugin will be loaded only when the following commands are called. For more options see `:h dein-options`.
@ -258,7 +258,7 @@ If you want to disable plugins which are added by SpaceVim, you can use SpaceVim
```toml
[options]
# NOTE: the value should be a list, and each item is the name of the plugin.
disabled_plugins = ["clighter", "clighter8"]
disabled_plugins = ["clighter", "clighter8"]
```
### Bootstrap Functions
@ -326,6 +326,7 @@ The different key bindings between SpaceVim and origin vim are shown as below.
```
- The `jk` key has been mapped to `<Esc>` in insert mode. To disable this key binding, set `escape_key_binding` to empty string.
```toml
[options]
escape_key_binding = ''
@ -381,9 +382,9 @@ disabled_plugins = ["neomake.vim"]
```toml
[[custom_plugins]]
name = "wsdjeg/neomake.vim"
# note: you need to disable merged feature
merged = false
repo = "wsdjeg/neomake.vim"
# note: you need to disable merged feature
merged = false
```
Use the `bootstrap_before` function to add local plugin:

View File

@ -64,7 +64,7 @@ are available on Github, use the `custom_plugins` section in configuration file.
# add custom_plugins: https://github.com/mhartington/oceanic-next
[[custom_plugins]]
name = "mhartington/oceanic-next"
repo = "mhartington/oceanic-next"
merged = 0
```

View File

@ -107,7 +107,7 @@ documentation.
# This is an example for adding custom plugins lilydjwg/colorizer
[[custom_plugins]]
name = "lilydjwg/colorizer"
repo = "lilydjwg/colorizer"
merged = false
```