mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 02:05:40 +08:00
Fix #220
This commit is contained in:
parent
a1e420df2b
commit
69b21485da
@ -355,3 +355,15 @@ endfunction
|
||||
" step 3: compile YouCompleteMe with the feature you want. if you just want
|
||||
" support c family, you need run `./install.py --clang-completer`.
|
||||
" <
|
||||
"
|
||||
" 2. How to add custom snippt?
|
||||
"
|
||||
" SpaceVim use neosnippet as default snippet engine. If you want to add
|
||||
" snippet for vim filetype, open a vim file, run `:NeoSnippetEdit` command, a
|
||||
" buffer will be opened, you can add your custom snippet, by default this
|
||||
" buffer will be save in `~/.SpaceVim.d/snippets`, if you want to use other
|
||||
" directory:
|
||||
" >
|
||||
" let g:neosnippet#snippets_directory = '~/path/to/snip_dir'
|
||||
" <
|
||||
" for more info about how to write snippet, please read ||neosnippet-snippet-syntax|.
|
||||
|
13
autoload/SpaceVim/layers/default.vim
Normal file
13
autoload/SpaceVim/layers/default.vim
Normal file
@ -0,0 +1,13 @@
|
||||
""
|
||||
" @section Default, default
|
||||
" @parentsection layers
|
||||
|
||||
function! SpaceVim#layers#default#plugins() abort
|
||||
let plugins = []
|
||||
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#default#config() abort
|
||||
|
||||
endfunction
|
@ -1,6 +1,6 @@
|
||||
function! SpaceVim#layers#lang#plugins() abort
|
||||
let plugins = [
|
||||
\ ['Shougo/neosnippet.vim', { 'on_i' : 1 , 'on_ft' : 'neosnippet', 'loadconf' : 1}],
|
||||
\ ['Shougo/neosnippet.vim', { 'on_i' : 1 , 'on_ft' : 'neosnippet', 'loadconf' : 1, 'on_cmd' : 'NeoSnippetEdit'}],
|
||||
\ ['m2mdas/phpcomplete-extended', { 'on_ft' : 'php'}],
|
||||
\ ['groenewege/vim-less', { 'on_ft' : ['less']}],
|
||||
\ ['cakebaker/scss-syntax.vim', { 'on_ft' : ['scss','sass']}],
|
||||
|
@ -1,6 +1,14 @@
|
||||
let g:neosnippet#snippets_directory = [expand('~/.SpaceVim.d/snippets/'), expand('~/.SpaceVim/snippets/')]
|
||||
let g:neosnippet#snippets_directory = get(g:,'neosnippet#snippets_directory', '')
|
||||
if empty(g:neosnippet#snippets_directory)
|
||||
let g:neosnippet#snippets_directory = [expand('~/.SpaceVim/snippets/'), expand('~/.SpaceVim.d/snippets/')]
|
||||
elseif type(g:spacevim_force_global_config) == type('')
|
||||
let g:neosnippet#snippets_directory = [expand('~/.SpaceVim/snippets/'), expand('~/.SpaceVim.d/snippets/')] + [g:neosnippet#snippets_directory]
|
||||
elseif type(g:spacevim_force_global_config) == type([])
|
||||
let g:neosnippet#snippets_directory = [expand('~/.SpaceVim/snippets/'), expand('~/.SpaceVim.d/snippets/')] + g:neosnippet#snippets_directory
|
||||
endif
|
||||
|
||||
if g:spacevim_force_global_config == 0
|
||||
call add(g:neosnippet#snippets_directory, getcwd() . '/.Spacevim.d/snippets')
|
||||
let g:neosnippet#snippets_directory = [getcwd() . '/.Spacevim.d/snippets'] + g:neosnippet#snippets_directory
|
||||
endif
|
||||
let g:neosnippet#enable_snipmate_compatibility=1
|
||||
let g:neosnippet#enable_complete_done = 1
|
||||
|
@ -7,18 +7,19 @@ CONTENTS *SpaceVim-contents*
|
||||
2. CONFIGURATION...........................................|SpaceVim-config|
|
||||
3. Functions............................................|SpaceVim-functions|
|
||||
4. Layers..................................................|SpaceVim-layers|
|
||||
1. autocomplete..................................|SpaceVim-autocomplete|
|
||||
2. checkers....................................|SpaceVim-layer-checkers|
|
||||
3. colorscheme....................................|SpaceVim-colorscheme|
|
||||
4. lang#c........................................|SpaceVim-layer-lang-c|
|
||||
5. lang#elixir..............................|SpaceVim-layer-lang-elixir|
|
||||
6. lang#go......................................|SpaceVim-layer-lang-go|
|
||||
7. lang#java..................................|SpaceVim-layer-lang-java|
|
||||
8. lang#php....................................|SpaceVim-layer-lang-php|
|
||||
9. lang#python..............................|SpaceVim-layer-lang-python|
|
||||
10. lang#rust.................................|SpaceVim-layer-lang-rust|
|
||||
11. lang#xml...................................|SpaceVim-layer-lang-xml|
|
||||
12. shell.........................................|SpaceVim-layer-shell|
|
||||
1. Default............................................|SpaceVim-default|
|
||||
2. autocomplete..................................|SpaceVim-autocomplete|
|
||||
3. checkers....................................|SpaceVim-layer-checkers|
|
||||
4. colorscheme....................................|SpaceVim-colorscheme|
|
||||
5. lang#c........................................|SpaceVim-layer-lang-c|
|
||||
6. lang#elixir..............................|SpaceVim-layer-lang-elixir|
|
||||
7. lang#go......................................|SpaceVim-layer-lang-go|
|
||||
8. lang#java..................................|SpaceVim-layer-lang-java|
|
||||
9. lang#php....................................|SpaceVim-layer-lang-php|
|
||||
10. lang#python.............................|SpaceVim-layer-lang-python|
|
||||
11. lang#rust.................................|SpaceVim-layer-lang-rust|
|
||||
12. lang#xml...................................|SpaceVim-layer-lang-xml|
|
||||
13. shell.........................................|SpaceVim-layer-shell|
|
||||
5. FAQ........................................................|SpaceVim-faq|
|
||||
|
||||
==============================================================================
|
||||
@ -255,6 +256,9 @@ LAYERS *SpaceVim-layers*
|
||||
|
||||
SpaceVim support such layers:
|
||||
|
||||
==============================================================================
|
||||
DEFAULT *SpaceVim-default*
|
||||
|
||||
==============================================================================
|
||||
AUTOCOMPLETE *SpaceVim-autocomplete*
|
||||
|
||||
@ -599,5 +603,17 @@ it is hard to manager by vim plugin manager.)
|
||||
support c family, you need run `./install.py --clang-completer`.
|
||||
<
|
||||
|
||||
2. How to add custom snippt?
|
||||
|
||||
SpaceVim use neosnippet as default snippet engine. If you want to add snippet
|
||||
for vim filetype, open a vim file, run `:NeoSnippetEdit` command, a buffer
|
||||
will be opened, you can add your custom snippet, by default this buffer will
|
||||
be save in `~/.SpaceVim.d/snippets`, if you want to use other directory:
|
||||
>
|
||||
let g:neosnippet#snippets_directory = '~/path/to/snip_dir'
|
||||
<
|
||||
for more info about how to write snippet, please read
|
||||
||neosnippet-snippet-syntax|.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
Loading…
x
Reference in New Issue
Block a user