From 738f6739d49fa04bcb1b2372d74cb07a6de8a8f8 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Fri, 10 Feb 2017 22:05:19 +0800 Subject: [PATCH] Update contribute --- docs/development.md | 19 +++++++++++++++++++ docs/documentation.md | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 3b2a9bd8c..39f281cab 100644 --- a/docs/development.md +++ b/docs/development.md @@ -9,3 +9,22 @@ If you get any issues, please open an issue with the ISSUE_TEMPLATE. It is useful for me to debug for this issue. ## Contribute Layers + +1. fork SpaceVim repo +2. add a layer file `autoload/SpaceVim/layers/foo.vim` for `foo` layer. +3. edit layer file, check out the example below: + +```vim +function! SpaceVim#layers#foo#plugins() abort + let plugins = [] + call add(plugins, ['Shougo/foo.vim', {'option' : 'value'}]) + return plugins +endfunction + + +function! SpaceVim#layers#foo#config() abort + " here you can set some value or mappings +endfunction +``` + +4. send PR to SpaceVim. diff --git a/docs/documentation.md b/docs/documentation.md index f9bb69bfe..abb99cc42 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -10,7 +10,7 @@ - [Unite centric work-flow](#unite-centric-work-flow) - [multiple leader mode](#multiple-leader-mode) - [Custom configuration](#custom-configuration) -- [Layers](#layers) +- [Layers](https://spacevim.org/layers) # Features