]> Untitled Git - vimfiles.git/commitdiff
new c settings
authorPhilippe Hürlimann <p@hurlimann.org>
Tue, 26 Mar 2019 16:17:27 +0000 (17:17 +0100)
committerPhilippe Hürlimann <p@hurlimann.org>
Tue, 26 Mar 2019 16:17:56 +0000 (17:17 +0100)
ftplugin/c.vim
init.vim

index 6dd8388488252388510e616fa04cd275da53be09..a740a241edb18d3409e5b4b569f39cc259683c1b 100644 (file)
@@ -1,6 +1,10 @@
 let g:clang_complete_copen=1
 let g:clang_auto_select=1
-
+let g:clang_format#detect_style_file=1
 let g:clang_format#code_style="chromium"
 
 nnoremap <leader>f :ClangFormat<cr>
+
+set tabstop=2
+set shiftwidth=2
+set softtabstop=2
index 49f180078393291721d12918aad8bb1130f23a94..6f817ef34acd8a670c113d038cdee63201918ae1 100644 (file)
--- a/init.vim
+++ b/init.vim
@@ -1,5 +1,7 @@
 set runtimepath^=/usr/share/vim/vimfiles
 
+autocmd BufRead,BufNewFile *.h set filetype=c
+
 call plug#begin('~/.local/share/nvim/plugged')
 
 Plug 'airblade/vim-gitgutter'
@@ -54,6 +56,7 @@ set laststatus=2
 set hidden
 
 let g:LanguageClient_serverCommands = {
+    \ 'c': ['ccls', '--log-file=/tmp/cc.log'],
     \ 'haskell': ['hie-wrapper'],
     \ 'python': ['pyls'],
     \ 'rust': ['rustup', 'run', 'stable', 'rls'],