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

Throws parsing error for .json files #4

Closed
sharkinsspatial opened this Issue Feb 18, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@sharkinsspatial
Copy link

sharkinsspatial commented Feb 18, 2015

As Vim sets .json filetype to javascript automatically editing .json files throws a
Unexpected token : error.

This can be fixed by explicitly specifying the .json filetype and another linter in .vimrc with something like

au BufRead,BufNewFile *.json set filetype=json
let g:syntastic_json_checkers=['jsonlint']
@jaxbot

This comment has been minimized.

Copy link
Owner

jaxbot commented Feb 18, 2015

If you use https://github.com/elzr/vim-json, Vim will already have filetype=json set and render JSON in a more readable, accurate way, though this doesn't solve this particular problem.

I'm not really sure what the solution to this is in terms of this project, though; I don't want to change peoples' filetype defaults if they install this plugin

@jaxbot jaxbot closed this in fe0c6ee Mar 3, 2015

@jaxbot

This comment has been minimized.

Copy link
Owner

jaxbot commented Mar 3, 2015

I added a note to the repo. Closing this bug as it is somewhat out of scope for the project and I don't want to implement code that would meddle with others' configurations. If you come up with a smoother solution or I misunderstood the problem, feel free to reopen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment