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

Syntax colouring not working for me #50

Open
squarefrog opened this issue Apr 13, 2015 · 7 comments
Open

Syntax colouring not working for me #50

squarefrog opened this issue Apr 13, 2015 · 7 comments

Comments

@squarefrog
Copy link

I have an issue where the syntax colouring isn't working for me using vim-json. If i :setf javascript it colours, albeit unhelpfully, but when I switch back to json it gives me the white wall of text.
screenshot 2015-04-13 08 56 06

I install the plugin using NeoBundle and you can see my bundle specific vimrc here, and my more general vimrc here.

Any help would be appreciated!

@elzr
Copy link
Owner

elzr commented Apr 13, 2015

Have you tried using another color scheme, say, the default slate or spacegray? It seems the plugin is correctly detecting keywords and values, concealing them and unconcealing them on the current line (which is puzzling because you seem to have disabled the concealing in your vimrc), but then the coloring is when things break down. Also, can you show me how the json-test.json file included in the plugin looks like?

@squarefrog
Copy link
Author

Thanks for the reply, changing the colour scheme does add some highlighting. The test json file looks like the following:

screenshot 2015-04-13 09 35 15
screenshot 2015-04-13 09 36 52

@squarefrog
Copy link
Author

And with slate:

screenshot 2015-04-13 09 39 17

@tgrosinger
Copy link

I too have a similar issue. I am using altercation/vim-colors-solarized and the syntax highlighting works correctly, however the background over errors does not turn red, making problems rather hard to spot.

Any suggestions?

@iamsebastian
Copy link

I have the same issue as @tgrosinger.
But changing the colorscheme does not help.

I use solarized dark, looks like this:
screenshot from 2015-08-19 155609

slate:
screenshot from 2015-08-19 155647

Monokai:
screenshot from 2015-08-19 155716

Maybe there's something wrong with my configuration, so there appears no error highlight?

Hint: I'm on gvim / terminal vim. Both behave the same issue.

@msjyoo
Copy link

msjyoo commented Nov 13, 2015

Overriding the syntax highlighting colour fixed it for me. e.g. hi! def link jsonKeyword Identifier

@vikas027
Copy link

vikas027 commented Feb 3, 2016

I also had the same issue since I use too many plugins. Even changing color schemes did not worked for me. But below line in ~/.vimrc worked like a charm, basically I am forcing vim to set json syntax.

au BufRead,BufNewFile,BufReadPost *.json set syntax=json

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

6 participants