Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to customise syntastic #653

Open
gryzzly opened this issue Mar 8, 2016 · 4 comments
Open

Not able to customise syntastic #653

gryzzly opened this issue Mar 8, 2016 · 4 comments

Comments

@gryzzly
Copy link

gryzzly commented Mar 8, 2016

Hi, I'm trying to use Janus and add custom settings for Syntastic.

If I place the following in either ~/.vimrc.before or ~/.vimrc.after the settings are not picked up:

set wildignore+=*/node_modules/*,*.so,*.swp,*.zi

" LINTER SETTINGS
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint_d')
let b:syntastic_javascript_eslint_exec = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')
let g:syntastic_javascript_checkers=['eslint']

If I run source ~/.vimrc.before after Vim has init, the settings are picked up.

What am I doing wrong?

Thanks!

@gabrielperales
Copy link

I have the same issue, i'm not able tu make it run

@drewblaisdell
Copy link

drewblaisdell commented Jul 11, 2016

I have the same issue. Adding this to my configuration to run the version of eslint in the current repo:

let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')
let b:syntastic_javascript_eslint_exec = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')

only works if I run source ~/.vimrc.

@jasonmerino
Copy link

I am having the same issue. Trying to get ESLint to run in Vim to no avail. Tried to add my Syntastic config to .vimrc.before and .vimrc.after and neither worked. :/

@sensorii
Copy link

Custom syntastic config in .vimrc.after works for me as expected, without issue.

To use the local eslint from the current repo, I installed this without any extra config: https://github.com/mtscout6/syntastic-local-eslint.vim

Note:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants