From dd589952dff6444ec6981fa65ad5f3f85637a2a2 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Tue, 12 Dec 2017 09:22:00 +0800 Subject: [PATCH] Fix layer func --- .SpaceVim.d/autoload/SpaceVim/dev/layers.vim | 7 +-- docs/layers/index.md | 48 ++++++++++---------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.SpaceVim.d/autoload/SpaceVim/dev/layers.vim b/.SpaceVim.d/autoload/SpaceVim/dev/layers.vim index 5b7e573af..3e4a9ef0e 100644 --- a/.SpaceVim.d/autoload/SpaceVim/dev/layers.vim +++ b/.SpaceVim.d/autoload/SpaceVim/dev/layers.vim @@ -6,6 +6,7 @@ function! SpaceVim#dev#layers#update() abort exe (start + 1) . ',' . (end - 1) . 'delete' endif call append(start, s:generate_content()) + silent! Neoformat endif endfunction @@ -30,12 +31,12 @@ function! s:layer_list() abort \ ] for layer in layers let name = split(layer, '/docs/layers')[1][:-4] . '/' - let url = 'https://spacevim.org/layers/' . name + let url = 'https://spacevim.org/layers' . name let content = readfile(layer) if len(content) > 3 - let line = '[' . name . '](' . url . ') | ' . content[2] + let line = '| [' . join(split(name, '/'), '#') . '](' . url . ') | ' . content[2][14:-2] . ' | ' else - let line = '[' . name . '](' . url . ') | can not find Description' + let line = '| [' . join(split(name, '/'), '#') . '](' . url . ') | can not find Description |' endif call add(list, line) endfor diff --git a/docs/layers/index.md b/docs/layers/index.md index d527d8608..2b942749d 100644 --- a/docs/layers/index.md +++ b/docs/layers/index.md @@ -21,28 +21,30 @@ call SpaceVim#layers#load('shell', ## Available layers -| Name | Description | -| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | -| [/autocomplete/](https://spacevim.org/layers//autocomplete/) | description: "This layer provides auto-completion to SpaceVim" | -| [/chat/](https://spacevim.org/layers//chat/) | --- | -| [/checkers/](https://spacevim.org/layers//checkers/) | description: "This layer provides syntax checking feature" | -| [/chinese/](https://spacevim.org/layers//chinese/) | can not find Description | -| [/colorscheme/](https://spacevim.org/layers//colorscheme/) | description: "colorscheme provides a list of colorscheme for SpaceVim, default colorscheme is gruvbox with dark theme." | -| [/default/](https://spacevim.org/layers//default/) | SpaceVim default layer contains none plugins, but it has some better default config for vim and neovim. | -| [/git/](https://spacevim.org/layers//git/) | description: "This layers adds extensive support for git" | -| [/index/](https://spacevim.org/layers//index/) | description: A list of available layers in SpaceVim. | -| [/lang/c/](https://spacevim.org/layers//lang/c/) | description: "This layer is for c/c++/object-c development" | -| [/lang/java/](https://spacevim.org/layers//lang/java/) | description: "This layer is for Java development" | -| [/lang/javascript/](https://spacevim.org/layers//lang/javascript/) | description: "This layer is for JaveScript development" | -| [/lang/lisp/](https://spacevim.org/layers//lang/lisp/) | This layer is for lisp development. | -| [/lang/markdown/](https://spacevim.org/layers//lang/markdown/) | description: "Edit markdown within vim, autopreview markdown in the default browser, with this layer you can also format markdown file." | -| [/lang/php/](https://spacevim.org/layers//lang/php/) | description: "This layer adds PHP language support to SpaceVim" | -| [/lang/python/](https://spacevim.org/layers//lang/python/) | description: "This layer is for Python development, provide autocompletion, syntax checking, code format for python file." | -| [/lang/ruby/](https://spacevim.org/layers//lang/ruby/) | --- | -| [/lang/typescript/](https://spacevim.org/layers//lang/typescript/) | description: "This layer is for TypeScript development" | -| [/lang/vim/](https://spacevim.org/layers//lang/vim/) | --- | -| [/shell/](https://spacevim.org/layers//shell/) | description: "This layer provide shell support in SpaceVim" | -| [/tags/](https://spacevim.org/layers//tags/) | description: "This layer provide tags manager for project" | -| [/ui/](https://spacevim.org/layers//ui/) | --- | +| Name | Description | +| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| [autocomplete](https://spacevim.org/layers/autocomplete/) | This layer provides auto-completion to SpaceVim | +| [chat](https://spacevim.org/layers/chat/) | | +| [checkers](https://spacevim.org/layers/checkers/) | This layer provides syntax checking feature | +| [chinese](https://spacevim.org/layers/chinese/) | can not find Description | +| [colorscheme](https://spacevim.org/layers/colorscheme/) | colorscheme provides a list of colorscheme for SpaceVim, default colorscheme is gruvbox with dark theme. | +| [default](https://spacevim.org/layers/default/) | lt layer contains none plugins, but it has some better default config for vim and neovim | +| [git](https://spacevim.org/layers/git/) | This layers adds extensive support for git | +| [index](https://spacevim.org/layers/index/) | list of available layers in SpaceVim | +| [lang#c](https://spacevim.org/layers/lang/c/) | This layer is for c/c++/object-c development | +| [lang#java](https://spacevim.org/layers/lang/java/) | This layer is for Java development | +| [lang#javascript](https://spacevim.org/layers/lang/javascript/) | This layer is for JaveScript development | +| [lang#lisp](https://spacevim.org/layers/lang/lisp/) | for lisp development | +| [lang#markdown](https://spacevim.org/layers/lang/markdown/) | Edit markdown within vim, autopreview markdown in the default browser, with this layer you can also format markdown file. | +| [lang#php](https://spacevim.org/layers/lang/php/) | This layer adds PHP language support to SpaceVim | +| [lang#python](https://spacevim.org/layers/lang/python/) | This layer is for Python development, provide autocompletion, syntax checking, code format for python file. | +| [lang#ruby](https://spacevim.org/layers/lang/ruby/) | | +| [lang#typescript](https://spacevim.org/layers/lang/typescript/) | This layer is for TypeScript development | +| [lang#vim](https://spacevim.org/layers/lang/vim/) | | +| [shell](https://spacevim.org/layers/shell/) | This layer provide shell support in SpaceVim | +| [tags](https://spacevim.org/layers/tags/) | This layer provide tags manager for project | +| [ui](https://spacevim.org/layers/ui/) | | + +