Updated vim config

This commit is contained in:
Alex D. 2022-03-30 19:21:01 +00:00
parent a91a6c4eac
commit a0ba024c4b
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
5 changed files with 26 additions and 42 deletions

12
.gitmodules vendored
View File

@ -1,12 +1,6 @@
[submodule "pack/airline/start/vim-airline"] [submodule "pack/airline/start/vim-airline"]
path = pack/airline/start/vim-airline path = pack/airline/start/vim-airline
url = https://github.com/vim-airline/vim-airline url = https://github.com/vim-airline/vim-airline
[submodule "pack/lang/start/vim-lsc"] [submodule "pack/lang/start/ale"]
path = pack/lang/start/vim-lsc path = pack/lang/start/ale
url = https://github.com/natebosch/vim-lsc url = https://github.com/dense-analysis/ale
[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

1
pack/lang/start/ale Submodule

@ -0,0 +1 @@
Subproject commit 80dcd648d389965603246c2c5a4554e3e4aa184c

@ -1 +0,0 @@
Subproject commit 95593b67723f23979cd7344ecfd049f2f917830f

@ -1 +0,0 @@
Subproject commit 25d625aa0274b4c9845afd49a5c8f21aceb25073

53
vimrc
View File

@ -1,34 +1,21 @@
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// shm=asTIt fo=rnl set mouse=a cb=unnamed,unnamedplus wim=longest,list,full backspace=indent,eol,start cmdheight=1 bg=dark nu rnu cot=menu si sta cpt=.,w,b,i tf foldmethod=syntax path+=** nocompatible sc nosmd listchars=trail,eol:,tab:\ list directory=$HOME/.vim/swap// shm=asTIt fo=rn hls lbr is lz
filetype plugin indent on filetype plugin indent on
syntax on syntax on
colorscheme delek colorscheme delek
cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit! <CR> let g:ale_completion_enabled = 1
cnoremap i! execute 'silent! write !doas make install' <CR> let g:ale_lint_on_text_changed = 'never'
function! CleverTab() let g:ale_lint_on_insert_leave = 0
if strpart( getline('.'), col('.')-2, 3) =~ '^\w' let g:ale_lint_on_enter = 0
if &completefunc let g:ale_fix_on_save = 1
return "\<C-X>\<C-U>" let g:ale_fixers = {
elseif exists('b:compkey') \ '*': ['remove_trailing_lines', 'trim_whitespace'],
return b:compkey \ 'go': ['gofmt'],
else \}
return "\<C-X>\<C-I>" set omnifunc=ale#completion#OmniFunc
endif highlight clear ALEErrorSign
else highlight clear ALEWarningSign
return "\<Tab>" let g:airline#extensions#ale#enabled = 1
endif
endfunction
inoremap <Tab> <C-R>=CleverTab()<CR>
autocmd FileType yaml setlocal sw=8 sts=8 expandtab
autocmd FileType tex command! Comp execute 'silent !pdflatex %' <bar> redraw!
autocmd FileType less command! Comp execute 'silent !lessc % %:r.css' <bar> redraw!
autocmd FileType tex command! Compdoc execute 'silent !pandoc -t docx % -o %:r.docx' <bar> redraw!
let g:lsc_server_commands = {'cpp': { 'command': 'clangd --completion-style=detailed --suggest-missing-includes --clang-tidy -j=8', 'suppress_stderr': v:true }, 'c': { 'command': 'clangd --completion-style=detailed --suggest-missing-includes --clang-tidy -j=8', 'suppress_stderr': v:true }}
let g:lsc_auto_map = v:true
let g:lsc_enable_autocomplete = v:true
let g:netrw_banner = 0 let g:netrw_banner = 0
let g:netrw_liststile = 3 let g:netrw_liststile = 3
@ -38,7 +25,11 @@ let g:airline#extensions#tabline#enabled = v:true
let g:airline_skip_empty_sections = v:true let g:airline_skip_empty_sections = v:true
let g:airline_theme='term' let g:airline_theme='term'
let g:clang_format#code_style = 'llvm' cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit! <CR>
let g:clang_format#detect_style_file = v:true cnoremap i! execute 'silent! write !doas make install' <CR>
let g:clang_format#auto_format = v:true
let g:clang_format#enable_fallback_style = 0 autocmd FileType yaml setlocal sw=8 sts=8 expandtab
autocmd FileType tex command! Comp execute 'silent !pdflatex %' <bar> redraw!
autocmd FileType less command! Comp execute 'silent !lessc % %:r.css' <bar> redraw!
autocmd FileType tex command! Compdoc execute 'silent !pandoc -t docx % -o %:r.docx' <bar> redraw!