Closed rstacruz closed 9 years ago
Good news: you can use it with syntastic without changes:
let g:syntastic_javascript_standard_exec = 'semistandard'
This doesn't seem to work for me...standard works fine however
@fourcolors What did you do, what did you expect to happen, and what happened instead?
Hi lcd047 !
Ok I figured out what the problem was. It just threw me off that I needed to set my checker to 'standard' and the standard_exec to 'semistandard' but it makes sense now haha. Ok so basically yes your line works BUT you must have this line in your vimrc file as well.
let g:syntastic_javascript_checkers = ['standard']
So you need both. Thank you for responding so quickly! Sorry about that.
@fourcolors The syntastic checker standard
handles both, yes. But you don't need to have both binaries standard
and semistandard
installed.
On the other hand, if you do have both binaries installed, you can switch between using them on the fly by pointing g:syntastic_javascript_standard_exec
alternatively to standard
and semistandard
, but only with relatively recent versions of syntastic. With older versions you need to restart Vim if you change g:syntastic_javascript_standard_exec
.
Ah, thank you for the clarification.
btw here's what I do on my vim config:
command! Standard :call <SID>standard()
command! Semistandard :call <SID>semistandard()
function! s:standard()
let g:syntastic_javascript_checkers = ['standard']
let g:syntastic_javascript_standard_exec = 'standard'
SyntasticCheck
endfunction
function! s:semistandard()
let g:syntastic_javascript_checkers = ['standard']
let g:syntastic_javascript_standard_exec = 'semistandard'
SyntasticCheck
endfunction
...I just then run :Standard
when I need it. Have these set up for other linters as well.
https://github.com/Flet/semistandard
syntastic already has a
standard
reporter.semistandard
is a drop-in replacement for standard (to enable semicolons).