mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-15 08:09:11 +08:00
docs(layers): add doc for loading layer with layer option
close https://github.com/SpaceVim/SpaceVim/pull/4545
This commit is contained in:
parent
5f1a7433e1
commit
0cdc0d6df3
@ -11,7 +11,7 @@ scriptencoding utf-8
|
||||
" @section Introduction, intro
|
||||
" @stylized spacevim
|
||||
" @library
|
||||
" @order intro options config layers usage api dev faq changelog
|
||||
" @order intro options config functions layers usage api dev faq changelog
|
||||
" SpaceVim is a bundle of custom settings and plugins with a modular
|
||||
" configuration for Vim. It was inspired by Spacemacs.
|
||||
"
|
||||
@ -36,8 +36,14 @@ scriptencoding utf-8
|
||||
""
|
||||
" @section Configuration, config
|
||||
" If you still want to use `~/.SpaceVim.d/init.vim` as configuration file,
|
||||
" please take a look at the following options.
|
||||
"
|
||||
" please take a look at the following options add @section(functions)
|
||||
|
||||
|
||||
""
|
||||
" @section Public functions, functions
|
||||
" All of these functions can be used in `~/.SpaceVim.d/init.vim` and bootstrap
|
||||
" functions.
|
||||
|
||||
|
||||
let s:SYSTEM = SpaceVim#api#import('system')
|
||||
|
||||
|
@ -54,7 +54,14 @@ let s:SYS = SpaceVim#api#import('system')
|
||||
|
||||
""
|
||||
" Load the {layer} you want. For all the layers SpaceVim supports, see @section(layers).
|
||||
" the second argv is the layer variable.
|
||||
" the second argv is the layer variable. For example:
|
||||
" >
|
||||
" call SpaceVim#layers#load('autocomplete',
|
||||
" \ {
|
||||
" \ 'auto_completion_delay' : 50,
|
||||
" \ }
|
||||
" \ )
|
||||
" <
|
||||
function! SpaceVim#layers#load(layer, ...) abort
|
||||
if a:layer ==# '-l'
|
||||
call s:list_layers()
|
||||
|
@ -83,7 +83,7 @@ CONTENTS *SpaceVim-contents*
|
||||
63. windows_smartclose.............|SpaceVim-options-windows_smartclose|
|
||||
3. Configuration...........................................|SpaceVim-config|
|
||||
4. Commands..............................................|SpaceVim-commands|
|
||||
5. Functions............................................|SpaceVim-functions|
|
||||
5. Public functions.....................................|SpaceVim-functions|
|
||||
6. Layers..................................................|SpaceVim-layers|
|
||||
1. autocomplete...........................|SpaceVim-layers-autocomplete|
|
||||
2. chat...........................................|SpaceVim-layers-chat|
|
||||
@ -857,8 +857,7 @@ feature, just set it to empty string:
|
||||
CONFIGURATION *SpaceVim-config*
|
||||
|
||||
If you still want to use `~/.SpaceVim.d/init.vim` as configuration file,
|
||||
please take a look at the following options.
|
||||
|
||||
please take a look at the following options add |SpaceVim-functions|
|
||||
|
||||
*g:spacevim_version*
|
||||
Version of SpaceVim , this value can not be changed.
|
||||
@ -1425,7 +1424,10 @@ COMMANDS *SpaceVim-commands*
|
||||
Switch to alternate file based on {type}.
|
||||
|
||||
==============================================================================
|
||||
FUNCTIONS *SpaceVim-functions*
|
||||
PUBLIC FUNCTIONS *SpaceVim-functions*
|
||||
|
||||
All of these functions can be used in `~/.SpaceVim.d/init.vim` and bootstrap
|
||||
functions.
|
||||
|
||||
SpaceVim#api#import({name}) *SpaceVim#api#import()*
|
||||
Import API base the given {name}, and return the API object. for all
|
||||
@ -1453,7 +1455,14 @@ SpaceVim#custom#LangSPCGroupName({ft}, {keys}, {name})
|
||||
|
||||
SpaceVim#layers#load({layer}) *SpaceVim#layers#load()*
|
||||
Load the {layer} you want. For all the layers SpaceVim supports, see
|
||||
|SpaceVim-layers|. the second argv is the layer variable.
|
||||
|SpaceVim-layers|. the second argv is the layer variable. For example:
|
||||
>
|
||||
call SpaceVim#layers#load('autocomplete',
|
||||
\ {
|
||||
\ 'auto_completion_delay' : 50,
|
||||
\ }
|
||||
\ )
|
||||
<
|
||||
|
||||
SpaceVim#logger#setLevel({level}) *SpaceVim#logger#setLevel()*
|
||||
Set debug level of SpaceVim. Default is 1.
|
||||
|
Loading…
x
Reference in New Issue
Block a user