test ale instead of syntastic

This commit is contained in:
Thomas Ruoff
2017-03-23 23:47:02 +01:00
parent 3581b87457
commit ae84781fbf
2 changed files with 8 additions and 45 deletions

38
vimrc
View File

@@ -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 <leader>fc :Commits<cr>
"" minibufexpl
map <Leader>t :MBEToggle<cr>
"" 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