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

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
syntax on
colorscheme delek
cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit! <CR>
cnoremap i! execute 'silent! write !doas make install' <CR>
function! CleverTab()
if strpart( getline('.'), col('.')-2, 3) =~ '^\w'
if &completefunc
return "\<C-X>\<C-U>"
elseif exists('b:compkey')
return b:compkey
else
return "\<C-X>\<C-I>"
endif
else
return "\<Tab>"
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:ale_completion_enabled = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_insert_leave = 0
let g:ale_lint_on_enter = 0
let g:ale_fix_on_save = 1
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'go': ['gofmt'],
\}
set omnifunc=ale#completion#OmniFunc
highlight clear ALEErrorSign
highlight clear ALEWarningSign
let g:airline#extensions#ale#enabled = 1
let g:netrw_banner = 0
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_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:true
let g:clang_format#enable_fallback_style = 0
cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit! <CR>
cnoremap i! execute 'silent! write !doas make install' <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!