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

Use Boolean and Number highlights for jsonBoolean and jsonNumber #76

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

rhysd
Copy link

@rhysd rhysd commented Jan 5, 2017

Currently they're highlighted as Delimiter. But there are
Boolean and Number for boolean values and numbers by default.
If there is no special reason, vim-json should use them.

Official syntax/json.vim does it.

https://github.com/vim/vim/blob/master/runtime/syntax/json.vim

currently it's highlighted as `Delimiter`. But there are
`Boolean` and `Number` for boolean values and numbers by default.
If there is no special reason, vim-json should use them.

Official syntax/json.vim does it.

https://github.com/vim/vim/blob/master/runtime/syntax/json.vim
@elzr elzr merged commit 48179b6 into elzr:master Nov 27, 2017
@elzr
Copy link
Owner

elzr commented Nov 27, 2017

There was no special reason, thanks!

@csaar95
Copy link

csaar95 commented Nov 6, 2018

There was a special reason: #37
Would be nice, if this commit could be reverted.

@ctranstrum
Copy link

While updating the syntax file to set numbers and bools to Delimiter is a solution that works for non-differentiating colorschemes, it feels a tiny bit hacky to me, and a more correct solution, albeit one that relies on end-user configuration, seems to be simply to update either your colorscheme or your .vimrc to color String, Number, and Boolean differently.

For example, add something like this to ~/.vimrc:

highlight String ctermfg=green
highlight Number ctermfg=blue
highlight Boolean ctermfg=magenta

Maybe it would be a good idea if a troubleshooting tip along these lines could be added to the documentation.

@rhysd
Copy link
Author

rhysd commented Jun 8, 2019

Since it's depending on colorscheme that string literal and number are highlighted in different colors, the documentation how to customize colors would be great. Many colorschemes highlight them in different colors, so current default values would be fine for most cases.

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

Successfully merging this pull request may close these issues.

4 participants