mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 02:05:40 +08:00
Add c layer doc
This commit is contained in:
parent
5388640af7
commit
c0557e480d
@ -1,7 +1,40 @@
|
|||||||
""
|
""
|
||||||
" @section Layer_lang_c
|
" @section Layer_lang_c
|
||||||
" this layer provide c family language code completion and syntax chaeck.you
|
" this layer provide c family language code completion and syntax chaeck.you
|
||||||
" need install clang.
|
" need install clang.
|
||||||
|
"
|
||||||
|
" configuration:
|
||||||
|
"
|
||||||
|
" 1.setting compile flag:
|
||||||
|
" >
|
||||||
|
" let g:deoplete#sources#clang#flags = ['-Iwhatever', ...]
|
||||||
|
" <
|
||||||
|
" 2.`g:deoplete#sources#clang#executable` sets the path to the clang
|
||||||
|
" executable.
|
||||||
|
"
|
||||||
|
" 3.`g:deoplete#sources#clang#autofill_neomake` is a boolean that tells this
|
||||||
|
" plugin to fill in the `g:neomake_<filetype>_clang_maker` variable with the
|
||||||
|
" clang executable path and flags. You will still need to enable it with
|
||||||
|
" `g:neomake_<filetype>_enabled_make=['clang']`.
|
||||||
|
"
|
||||||
|
" 4.`g:deoplete#sources#clang#std` is a dict containing the standards you want
|
||||||
|
" to use. It's not used if you already have `-std=whatever` in your flags. The
|
||||||
|
" defaults are:
|
||||||
|
" >
|
||||||
|
" {
|
||||||
|
" 'c': 'c11',
|
||||||
|
" 'cpp': 'c++1z',
|
||||||
|
" 'objc': 'c11',
|
||||||
|
" 'objcpp': 'c++1z',
|
||||||
|
" }
|
||||||
|
" <
|
||||||
|
" 5.`g:deoplete#sources#clang#preproc_max_lines` sets the
|
||||||
|
" maximum number of lines to search for a #ifdef or #endif
|
||||||
|
" line. #ifdef lines are discarded to get completions within
|
||||||
|
" conditional preprocessor blocks. The default is 50, setting it to 0 disables this feature.
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function! SpaceVim#layers#lang#c#plugins() abort
|
function! SpaceVim#layers#lang#c#plugins() abort
|
||||||
let plugins = []
|
let plugins = []
|
||||||
@ -14,5 +47,5 @@ function! SpaceVim#layers#lang#c#plugins() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#layers#lang#c#config() abort
|
function! SpaceVim#layers#lang#c#config() abort
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -425,6 +425,37 @@ LAYER_LANG_C *SpaceVim-layer_lang_c*
|
|||||||
this layer provide c family language code completion and syntax chaeck.you
|
this layer provide c family language code completion and syntax chaeck.you
|
||||||
need install clang.
|
need install clang.
|
||||||
|
|
||||||
|
configuration:
|
||||||
|
|
||||||
|
1.setting compile flag:
|
||||||
|
>
|
||||||
|
let g:deoplete#sources#clang#flags = ['-Iwhatever', ...]
|
||||||
|
<
|
||||||
|
2.`g:deoplete#sources#clang#executable` sets the path to the clang
|
||||||
|
executable.
|
||||||
|
|
||||||
|
3.`g:deoplete#sources#clang#autofill_neomake` is a boolean that tells this
|
||||||
|
plugin to fill in the `g:neomake_<filetype>_clang_maker` variable with the
|
||||||
|
clang executable path and flags. You will still need to enable it with
|
||||||
|
`g:neomake_<filetype>_enabled_make=['clang']`.
|
||||||
|
|
||||||
|
4.`g:deoplete#sources#clang#std` is a dict containing the standards you want
|
||||||
|
to use. It's not used if you already have `-std=whatever` in your flags. The
|
||||||
|
defaults are:
|
||||||
|
>
|
||||||
|
{
|
||||||
|
'c': 'c11',
|
||||||
|
'cpp': 'c++1z',
|
||||||
|
'objc': 'c11',
|
||||||
|
'objcpp': 'c++1z',
|
||||||
|
}
|
||||||
|
<
|
||||||
|
5.`g:deoplete#sources#clang#preproc_max_lines` sets the maximum number of
|
||||||
|
lines to search for a #ifdef or #endif line. #ifdef lines are discarded to
|
||||||
|
get completions within conditional preprocessor blocks. The default is 50,
|
||||||
|
setting it to 0 disables this feature.
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
LAYER-LANG-RUST *SpaceVim-layer-lang-rust*
|
LAYER-LANG-RUST *SpaceVim-layer-lang-rust*
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user