From c4058ac7271cb6561e1585cf8b26403b3b0f8db7 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Wed, 18 Jan 2017 23:35:37 +0800 Subject: [PATCH] Add clang plugin --- autoload/SpaceVim/layers/lang/c.vim | 21 +++++++++++++++++++++ config/plugins/deoplete-clang.vim | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 autoload/SpaceVim/layers/lang/c.vim create mode 100644 config/plugins/deoplete-clang.vim diff --git a/autoload/SpaceVim/layers/lang/c.vim b/autoload/SpaceVim/layers/lang/c.vim new file mode 100644 index 000000000..20d07d818 --- /dev/null +++ b/autoload/SpaceVim/layers/lang/c.vim @@ -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 diff --git a/config/plugins/deoplete-clang.vim b/config/plugins/deoplete-clang.vim new file mode 100644 index 000000000..da222ebc2 --- /dev/null +++ b/config/plugins/deoplete-clang.vim @@ -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/')