mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +08:00
'enable' of layer configuration supports expression (#3211)
This commit is contained in:
parent
aa893b2859
commit
fcfcfbfe73
@ -105,7 +105,8 @@ function! SpaceVim#custom#apply(config, type) abort
|
||||
endif
|
||||
let layers = get(a:config, 'layers', [])
|
||||
for layer in layers
|
||||
if !get(layer, 'enable', 1)
|
||||
let enable = get(layer, 'enable', 1)
|
||||
if (type(enable) == type('') && !eval(enable)) || (type(enable) != type('') && !enable)
|
||||
call SpaceVim#layers#disable(layer.name)
|
||||
else
|
||||
call SpaceVim#layers#load(layer.name, layer)
|
||||
|
Loading…
Reference in New Issue
Block a user