mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 06:27:21 +01:00
test ale instead of syntastic
This commit is contained in:
38
vimrc
38
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 <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
|
||||
|
||||
Reference in New Issue
Block a user