mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +08:00
Update lang#c layer (#3899)
This commit is contained in:
parent
4ddf18da36
commit
0004826efe
@ -19,7 +19,8 @@ function! SpaceVim#commands#load() abort
|
||||
""
|
||||
" Set or check SpaceVim option. {opt} should be the option name of
|
||||
" spacevim, This command will use [value] as the value of option name.
|
||||
command! -nargs=+ SPSet call SpaceVim#options#set(<f-args>)
|
||||
command! -nargs=+ -complete=custom,SpaceVim#commands#complete_options
|
||||
\ SPSet call SpaceVim#options#set(<f-args>)
|
||||
""
|
||||
" print the debug information of spacevim, [!] forces the output into a
|
||||
" new buffer.
|
||||
@ -296,5 +297,9 @@ function! s:SHA() abort
|
||||
return '-' . sha
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#commands#complete_options(...)
|
||||
return join(map(getcompletion('g:spacevim_','var'), 'v:val[11:]'), "\n")
|
||||
endfunction
|
||||
|
||||
|
||||
" vim:set et sw=2 cc=80:
|
||||
|
@ -119,7 +119,7 @@ function! SpaceVim#layers#lang#c#plugins() abort
|
||||
elseif g:spacevim_autocomplete_method ==# 'asyncomplete'
|
||||
call add(plugins, ['wsdjeg/asyncomplete-clang.vim', {'merged' : 0, 'loadconf' : 1}])
|
||||
else
|
||||
call add(plugins, ['Rip-Rip/clang_complete'])
|
||||
call add(plugins, ['Rip-Rip/clang_complete', {'if' : s:CPT.has('python') || s:CPT.has('python3')}])
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -56,6 +56,13 @@ This option requires `+python` or `+python3` enabled and `libclang` has been ins
|
||||
By default the autocomplete layer has been enabled, so after loading `lang#c` layer, the code completion
|
||||
for C/C++ language should works well.
|
||||
|
||||
If the `autocomplete_method` is `deoplete`, then `Shougo/deoplete-clangx` will be loaded in `lang#c` layer.
|
||||
|
||||
If the `autocomplete_method` is `asyncomplete`, then `wsdjeg/asyncomplete-clang.vim` will be loaded.
|
||||
|
||||
If the `autocomplete_method` is `neocomplete`, Then `Rip-Rip/clang_complete` will be loaded.
|
||||
|
||||
You can check the value of `autocomplete_method` via `:SPSet autocomplete_method`.
|
||||
|
||||
### alternate file jumping
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user