set 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 let g:ale_completion_enabled = 1 let g:ale_fix_on_save = 1 let g:ale_hover_to_preview = 1 let g:ale_fixers = { \ '*': ['remove_trailing_lines', 'trim_whitespace'], \ 'go': ['gofmt'], \} let g:ale_sign_error = 'E>' let g:ale_sign_warning = 'W>' let g:ale_sign_info = 'I>' let g:ale_floating_window_border = '' let g:ale_floating_preview = 1 let g:ale_detail_to_floating_preview = 1 let g:ale_hover_to_preview = 1 let g:ale_hover_to_floating_preview = 1 highlight SignColumn ctermbg=none let g:airline#extensions#ale#enabled = 1 function BufferSettings() let lsp_found=0 for linter in ale#linter#Get(&filetype) if !empty(linter.lsp) && ale#lsp_linter#CheckWithLSP(bufnr(''), linter) let lsp_found=1 endif endfor if (lsp_found) nnoremap K :ALEDocumentation nnoremap gr :ALEFindReferences nnoremap gd :ALEGoToDefinition nnoremap gy :ALEGoToTypeDefinition nnoremap gh :ALEHover setlocal omnifunc=ale#completion#OmniFunc endif endfunction autocmd BufRead,FileType * call BufferSettings() let g:netrw_banner = 0 let g:netrw_liststile = 3 let g:airline_powerline_fonts = v:true let g:airline#extensions#tabline#enabled = v:true let g:airline_skip_empty_sections = v:true let g:airline_theme='term' cnoremap w!! execute 'silent! write !doas tee % >/dev/null' edit! cnoremap i! execute 'silent! write !doas make install' function! CleverTab() if &omnifunc != '' return "\\" elseif &spell return "\\" else return "\\" endif endfunction inoremap =CleverTab() inoremap autocmd FileType yaml setlocal sw=8 sts=8 expandtab 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! packloadall silent! helptags ALL