From 08204349f45ecf2f31849f258eca6ed2f2f021f4 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 18 Apr 2020 22:24:55 +0800 Subject: [PATCH] update: add cpp/c support. --- plugins.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins.vim b/plugins.vim index 78ef668..a48515e 100644 --- a/plugins.vim +++ b/plugins.vim @@ -39,6 +39,8 @@ call plug#begin(g:PLUGIN_HOME) " Auto-completion Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } +Plug 'deoplete-plugins/deoplete-clang' + " Python source for deoplete Plug 'zchee/deoplete-jedi', { 'for': 'python' } @@ -618,7 +620,9 @@ augroup END " linters for different filetypes let g:ale_linters = { \ 'python': ['pylint'], - \ 'vim': ['vint'] + \ 'vim': ['vint'], + \ 'cpp': ['clang'], + \ 'c': ['clang'] \} " Only run linters in the g:ale_linters dictionary @@ -630,6 +634,13 @@ let g:ale_sign_warning = '!' """""""""""""""""""""""""""""" neoformat settings """"""""""""""""""""""" let g:neoformat_enabled_python = ['black', 'yapf'] +let g:neoformat_cpp_clangformat = { + \ 'exe': 'clang-format', + \ 'args': ['--style="{IndentWidth: 4}"'] +\} + +let g:neoformat_enabled_cpp = ['clangformat'] +let g:neoformat_enabled_c = ['clangformat'] "}} "{{ Git-related