diff --git a/.gitmodules b/.gitmodules index 2711602..cc50fd5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "pack/airline/start/vim-airline-themes"] path = pack/airline/start/vim-airline-themes url = https://github.com/vim-airline/vim-airline-themes +[submodule "pack/lang/start/vim-clang-format"] + path = pack/lang/start/vim-clang-format + url = https://github.com/rhysd/vim-clang-format diff --git a/pack/lang/start/vim-clang-format b/pack/lang/start/vim-clang-format new file mode 160000 index 0000000..95593b6 --- /dev/null +++ b/pack/lang/start/vim-clang-format @@ -0,0 +1 @@ +Subproject commit 95593b67723f23979cd7344ecfd049f2f917830f diff --git a/pack/lang/start/vim-lsc b/pack/lang/start/vim-lsc index 62c6f6a..8a13bdd 160000 --- a/pack/lang/start/vim-lsc +++ b/pack/lang/start/vim-lsc @@ -1 +1 @@ -Subproject commit 62c6f6aa227b1b3ef5e7cf7df9f0a9c1d855d7fe +Subproject commit 8a13bdd25c74a247a5258980d82af781ea65c592 diff --git a/vimrc b/vimrc index d6fa697..e34be62 100644 --- a/vimrc +++ b/vimrc @@ -1,8 +1,7 @@ -set mouse=a cb=unnamed,unnamedplus wim=longest,list,full nocompatible backspace=indent,eol,start cmdheight=1 bg=dark nu rnu showcmd incsearch listchars=tab:\|\ list cot=menu,longest,preview si sta cpt=".,w,b,i" tf path+=** aw -filetype plugin on -filetype indent on +set mouse=a cb=unnamed,unnamedplus wim=longest,list,full nocompatible backspace=indent,eol,start cmdheight=1 bg=dark nu rnu showcmd incsearch listchars=trail:·,tab:\\ ,eol: list cot=menu,longest si sta cpt=".,w,b,i" tf path+=** aw +filetype plugin indent on syntax on -colorscheme delek +colorscheme peachpuff cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! cnoremap i! execute 'silent! write !sudo make install' @@ -14,14 +13,21 @@ function! CleverTab() endif endfunction inoremap =CleverTab() +cnoremap cles execute 'silent !lessc % %:r.css' redraw! +cnoremap cltx execute 'silent !rubber -d %' redraw! +cnoremap cdoc execute 'silent !pandoc -t docx % -o %:r.docx' redraw! +autocmd FileType c,h,cpp,hpp ClangFormatAutoEnable -let g:lsc_server_commands = {'cpp': { 'command': 'clangd', 'suppress_stderr': v:true }, 'c': { 'command': 'clangd', 'suppress_stderr': v:true }, 'tex': { 'command': 'texlab', 'suppress_stderr': v:true }} +let g:lsc_server_commands = {'java': 'jdtls','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_auto_map = 1 -let g:netrw_banner=0 -let g:netrw_liststile=3 +let g:netrw_banner = 0 +let g:netrw_liststile = 3 let g:airline_powerline_fonts = 1 -let g:airline_theme='simple' +let g:airline_theme = 'simple' let g:airline#extensions#tabline#enabled = 1 let g:airline_skip_empty_sections = 1 + +let g:clang_format#code_style = 'llvm' +let g:clang_format#detect_style_file = 1