diff --git a/vim/lightline.vim b/vim/lightline.vim index 0c8101e..4094c74 100644 --- a/vim/lightline.vim +++ b/vim/lightline.vim @@ -3,7 +3,7 @@ let g:lightline = { \ 'colorscheme': 'solarized', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], - \ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ 'right': [ [ 'ale', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] \ }, \ 'component_function': { \ 'fugitive': 'LightLineFugitive', @@ -15,10 +15,10 @@ let g:lightline = { \ 'ctrlpmark': 'CtrlPMark', \ }, \ 'component_expand': { - \ 'syntastic': 'SyntasticStatuslineFlag', + \ 'ale': 'ale#statusline#Status', \ }, \ 'component_type': { - \ 'syntastic': 'error', + \ 'ale': 'error', \ }, \ 'subseparator': { 'left': '|', 'right': '|' } \ } @@ -115,15 +115,6 @@ function! TagbarStatusFunc(current, sort, fname, ...) abort return lightline#statusline(0) endfunction -augroup AutoSyntastic - autocmd! - autocmd BufWritePost *.c,*.cpp,*.js,*.py call s:syntastic() -augroup END -function! s:syntastic() - SyntasticCheck - call lightline#update() -endfunction - let g:unite_force_overwrite_statusline = 0 let g:vimfiler_force_overwrite_statusline = 0 let g:vimshell_force_overwrite_statusline = 0 diff --git a/vimrc b/vimrc index fcaf61b..1c01733 100644 --- a/vimrc +++ b/vimrc @@ -28,7 +28,7 @@ Plug 'fholgado/minibufexpl.vim' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' -Plug 'scrooloose/syntastic' +Plug 'w0rp/ale' Plug 'tpope/vim-fugitive' Plug 'rhysd/conflict-marker.vim' @@ -264,41 +264,13 @@ nnoremap fc :Commits "" minibufexpl map t :MBEToggle -"" syntastic -let g:syntastic_always_populate_loc_list = 1 -let g:syntastic_auto_loc_list = 0 -let g:syntastic_check_on_open = 1 -let g:syntastic_check_on_wq = 0 - -" local linter support -let g:syntastic_javascript_checkers = [] - -function! CheckJavaScriptLinter(filepath, linter) - if exists('b:syntastic_checkers') - return - endif - if filereadable(a:filepath) - let b:syntastic_checkers = [a:linter] - let {'b:syntastic_' . a:linter . '_exec'} = a:filepath - endif -endfunction - -function! SetupJavaScriptLinter() - let l:current_folder = expand('%:p:h') - let l:bin_folder = fnamemodify(syntastic#util#findFileInParent('package.json', l:current_folder), ':h') - let l:bin_folder = l:bin_folder . '/node_modules/.bin/' - call CheckJavaScriptLinter(l:bin_folder . 'standard', 'standard') - call CheckJavaScriptLinter(l:bin_folder . 'eslint', 'eslint') -endfunction - -augroup syntastic - autocmd! - autocmd FileType javascript call SetupJavaScriptLinter() -augroup END - "" lightline if filereadable(expand("~/.vim/lightline.vim")) source ~/.vim/lightline.vim + augroup ale-statusline + autocmd! + autocmd User ALELint call lightline#update() + augroup END endif "" Unimpaired