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

View File

@@ -3,7 +3,7 @@ let g:lightline = {
\ 'colorscheme': 'solarized', \ 'colorscheme': 'solarized',
\ 'active': { \ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ],
\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] \ 'right': [ [ 'ale', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ }, \ },
\ 'component_function': { \ 'component_function': {
\ 'fugitive': 'LightLineFugitive', \ 'fugitive': 'LightLineFugitive',
@@ -15,10 +15,10 @@ let g:lightline = {
\ 'ctrlpmark': 'CtrlPMark', \ 'ctrlpmark': 'CtrlPMark',
\ }, \ },
\ 'component_expand': { \ 'component_expand': {
\ 'syntastic': 'SyntasticStatuslineFlag', \ 'ale': 'ale#statusline#Status',
\ }, \ },
\ 'component_type': { \ 'component_type': {
\ 'syntastic': 'error', \ 'ale': 'error',
\ }, \ },
\ 'subseparator': { 'left': '|', 'right': '|' } \ 'subseparator': { 'left': '|', 'right': '|' }
\ } \ }
@@ -115,15 +115,6 @@ function! TagbarStatusFunc(current, sort, fname, ...) abort
return lightline#statusline(0) return lightline#statusline(0)
endfunction 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:unite_force_overwrite_statusline = 0
let g:vimfiler_force_overwrite_statusline = 0 let g:vimfiler_force_overwrite_statusline = 0
let g:vimshell_force_overwrite_statusline = 0 let g:vimshell_force_overwrite_statusline = 0

38
vimrc
View File

@@ -28,7 +28,7 @@ Plug 'fholgado/minibufexpl.vim'
Plug 'SirVer/ultisnips' Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets' Plug 'honza/vim-snippets'
Plug 'scrooloose/syntastic' Plug 'w0rp/ale'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'rhysd/conflict-marker.vim' Plug 'rhysd/conflict-marker.vim'
@@ -264,41 +264,13 @@ nnoremap <leader>fc :Commits<cr>
"" minibufexpl "" minibufexpl
map <Leader>t :MBEToggle<cr> 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 "" lightline
if filereadable(expand("~/.vim/lightline.vim")) if filereadable(expand("~/.vim/lightline.vim"))
source ~/.vim/lightline.vim source ~/.vim/lightline.vim
augroup ale-statusline
autocmd!
autocmd User ALELint call lightline#update()
augroup END
endif endif
"" Unimpaired "" Unimpaired