I think the json.vim syntax file should be usable all by itself, and not require the other files in this repo. Currently it isn't usable like that, because on line 49 (and later on 114) there is this: if (g:vim_json_warnings == 1).
if (g:vim_json_warnings == 1)
If the user hasn't predefined g:vim_json_warnings, then this causes an error message to appear. That variable is predefined in the ftplugin, but not in the syntax file itself.
I think what's needed is if exists("g:vim_json_warnings") && g:vim_json_warnings==1
if exists("g:vim_json_warnings") && g:vim_json_warnings==1
PR in #32 :)
Hmm... that's a good point @chdiza. I only just added that g:vim_json_warnings check 2 days ago. I wonder though if it shouldn't be if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1, so that in the standalone mode you mention (json.vim syntax file only) displaying warnings is the default. What do you think?
if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1
Well, that's totally up to you. Notice that under your most recent suggestion, there's no reason to set the variable to 1 in the ftplugin; warnings would be on unless the user explicitly unsets them.
Thanks for the attention to detail. :) I ended up defaulting to displaying warnings because I think it's half the point of the plugin (the other half being the concealing). I'm still setting the variable to 1 in the ftplugin, for consistency & clarity, even if logically unnecessary.