diff --git a/.gitmodules b/.gitmodules index cc50fd5..e0b334f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/pack/lang/start/ale b/pack/lang/start/ale new file mode 160000 index 0000000..80dcd64 --- /dev/null +++ b/pack/lang/start/ale @@ -0,0 +1 @@ +Subproject commit 80dcd648d389965603246c2c5a4554e3e4aa184c diff --git a/pack/lang/start/vim-clang-format b/pack/lang/start/vim-clang-format deleted file mode 160000 index 95593b6..0000000 --- a/pack/lang/start/vim-clang-format +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 95593b67723f23979cd7344ecfd049f2f917830f diff --git a/pack/lang/start/vim-lsc b/pack/lang/start/vim-lsc deleted file mode 160000 index 25d625a..0000000 --- a/pack/lang/start/vim-lsc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 25d625aa0274b4c9845afd49a5c8f21aceb25073 diff --git a/vimrc b/vimrc index 5505eae..c652810 100644 --- a/vimrc +++ b/vimrc @@ -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' edit! -cnoremap i! execute 'silent! write !doas make install' -function! CleverTab() - if strpart( getline('.'), col('.')-2, 3) =~ '^\w' - if &completefunc - return "\\" - elseif exists('b:compkey') - return b:compkey - else - return "\\" - endif - else - return "\" - endif -endfunction -inoremap =CleverTab() - -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! - -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' edit! +cnoremap i! execute 'silent! write !doas make install' + +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!