Closed rhysd closed 7 years ago
There was no special reason, thanks!
There was a special reason: #37 Would be nice, if this commit could be reverted.
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.
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.
Currently they're highlighted as
Delimiter
. But there areBoolean
andNumber
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