1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-13 17:30:40 +08:00

Merge pull request #128 from SpaceVim/lang/c

Lang/c
This commit is contained in:
Wang Shidong 2017-01-19 00:00:59 +08:00 committed by GitHub
commit eadaf62aa6
7 changed files with 55 additions and 34 deletions

View File

@ -224,28 +224,6 @@ function! SpaceVim#loadCustomConfig() abort
endif
endfunction
""
" @section Layers, layers
" SpaceVim support such layers:
"
" core : core plugins for SpaceVim.
"
" autocompletion : Plugins for autocompletion,
"
" maker : syntax checker
"
" unite : unite centric work-flow
"
" lang#java : java autocompletion and syntax checker
""
" Load the {layer} you want, for more info see `:h SpaceVim-layers`.
function! SpaceVim#Layer(layer) abort
if index(g:spacevim_plugin_groups, a:layer) == -1
call add(g:spacevim_plugin_groups, a:layer)
endif
endfunction
function! SpaceVim#end() abort
if !empty(g:spacevim_windows_leader)

View File

@ -0,0 +1,12 @@
""
" @section Layers, layers
" SpaceVim support such layers:
""
" Load the {layer} you want, for all the layers SpaceVim supported, see @section(layers).
function! SpaceVim#layers#load(layer) abort
if index(g:spacevim_plugin_groups, a:layer) == -1
call add(g:spacevim_plugin_groups, a:layer)
endif
endfunction

View File

@ -0,0 +1,21 @@
" lang#c :
"
" this layer provide c family language code completion.
"
" requirement:
" clang
" libclang
function! SpaceVim#layers#lang#c#plugins() abort
let plugins = []
if has('nvim')
call add(plugins, ['tweekmonster/deoplete-clang2'])
else
call add(plugins, ['Rip-Rip/clang_complete'])
endif
return plugins
endfunction
function! SpaceVim#layers#lang#c#config() abort
endfunction

View File

@ -1,3 +1,16 @@
" lang#php :
" this layer is for php development, and it provide auto codo completion,
" and syntax check, and jump to the definition location.
"
" requirement:
" PHP 5.3+
" PCNTL Extension
" Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
" Composer Project
"
function! SpaceVim#layers#lang#php#plugins() abort
let plugins = []
if has('nvim')

View File

@ -0,0 +1,4 @@
let g:deoplete#sources#clang#libclang_path =
\ get(g:, 'deoplete#sources#clang#libclang_path', '/usr/lib/libclang.so')
let g:deoplete#sources#clang#clang_header =
\ get(g:, 'deoplete#sources#clang#clang_header', '/usr/lib/clang/')

View File

@ -17,7 +17,9 @@ let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
let g:deoplete#omni_patterns.php = '->\|::'
let g:deoplete#ignore_sources = {}
let g:deoplete#ignore_sources.go = ['omni']
let g:deoplete#ignore_sources.c = ['omni']
call deoplete#custom#set('go', 'mark', '')
call deoplete#custom#set('clang2', 'mark', '')
if g:spacevim_enable_javacomplete2_py
let g:deoplete#ignore_sources.java = ['omni']
call deoplete#custom#set('javacomplete2', 'mark', '')

View File

@ -181,8 +181,9 @@ twitter.
==============================================================================
FUNCTIONS *SpaceVim-functions*
SpaceVim#Layer({layer}) *SpaceVim#Layer()*
Load the {layer} you want, for more info see `:h SpaceVim-layers`.
SpaceVim#layers#load({layer}) *SpaceVim#layers#load()*
Load the {layer} you want, for all the layers SpaceVim supported, see
|SpaceVim-layers|.
SpaceVim#logger#setLevel({level}) *SpaceVim#logger#setLevel()*
Set debug level of SpaceVim, by default it is 1. all message will be logged.
@ -202,15 +203,5 @@ LAYERS *SpaceVim-layers*
SpaceVim support such layers:
core : core plugins for SpaceVim.
autocompletion : Plugins for autocompletion,
maker : syntax checker
unite : unite centric work-flow
lang#java : java autocompletion and syntax checker
vim:tw=78:ts=8:ft=help:norl: