mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +08:00
Add clang plugin
This commit is contained in:
parent
3345d722af
commit
c4058ac727
21
autoload/SpaceVim/layers/lang/c.vim
Normal file
21
autoload/SpaceVim/layers/lang/c.vim
Normal 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, ['zchee/deoplete-clang'])
|
||||
else
|
||||
call add(plugins, ['Rip-Rip/clang_complete'])
|
||||
endif
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#c#config() abort
|
||||
|
||||
endfunction
|
4
config/plugins/deoplete-clang.vim
Normal file
4
config/plugins/deoplete-clang.vim
Normal 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/')
|
Loading…
Reference in New Issue
Block a user