From 76cbc9bfe83fe45a7f46eacd36d8ee1563412048 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sun, 17 Jan 2021 13:13:07 +0000 Subject: [PATCH] More intelligent clang_format and tweak stuff --- vimrc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vimrc b/vimrc index e056915..dc84b7d 100644 --- a/vimrc +++ b/vimrc @@ -1,10 +1,10 @@ -set mouse=a cb=unnamed,unnamedplus wim=longest,list,full backspace=indent,eol,start cmdheight=1 bg=dark nu rnu incsearch cot=menu si sta cpt=.,w,b,i tf foldmethod=syntax path+=** nocompatible sc nosmd cursorline listchars=trail:·,eol:,tab:\ list +set mouse=a cb=unnamed,unnamedplus wim=longest,list,full backspace=indent,eol,start cmdheight=1 bg=dark nu rnu incsearch cot=menu si sta cpt=.,w,b,i tf foldmethod=syntax path+=** nocompatible sc nosmd cursorline listchars=trail:·,eol:,tab:\ list directory=$HOME/.vim/swap// filetype plugin indent on syntax on colorscheme delek -cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! -cnoremap i! execute 'silent! write !sudo make install' +cnoremap w!! execute 'silent! write !doas tee % >/dev/null' edit! +cnoremap i! execute 'silent! write !doas make install' function! CleverTab() if strpart( getline('.'), col('.')-2, 3) =~ '^\w' if &completefunc @@ -22,11 +22,11 @@ inoremap =CleverTab() autocmd FileType yaml setlocal sw=8 sts=8 expandtab -autocmd FileType tex command! Comp execute 'silent !rubber -d %' redraw! +autocmd FileType tex command! Comp execute 'silent !pdflatex %' redraw! autocmd FileType less command! Comp execute 'silent !lessc % %:r.css' redraw! autocmd FileType tex command! Compdoc execute 'silent !pandoc -t docx % -o %:r.docx' redraw! -let g:lsc_server_commands = {'java': 'jdtls', 'rust': 'rls', 'python': 'pyls','html': 'html-languageserver --stdio','less': 'css-languageserver --stdio','css': 'css-languageserver --stdio', 'cpp': { 'command': 'clangd', 'suppress_stderr': v:true }, 'c': { 'command': 'clangd', 'suppress_stderr': v:true }} +let g:lsc_server_commands = {'cpp': { 'command': 'clangd --completion-style=detailed --clang-tidy --all-scopes-completion -j=8 --background-index', 'suppress_stderr': v:true }, 'c': { 'command': 'clangd --completion-style=detailed --clang-tidy --all-scopes-completion -j=8 --background-index', 'suppress_stderr': v:true }} let g:lsc_auto_map = v:true let g:lsc_enable_autocomplete = v:true @@ -40,4 +40,5 @@ let g:airline_theme='term' let g:clang_format#code_style = 'llvm' let g:clang_format#detect_style_file = v:true -let g:clang_format#auto_format = v:false +let g:clang_format#auto_format = v:true +let g:clang_format#enable_fallback_style = 0