Andrea Bolognani <abolo...@redhat.com> writes: > The various schemas included in QEMU use a JSON-based format which > is, however, strictly speaking not valid JSON. > > As a consequence, when vim tries to apply syntax highlight rules > for JSON (as guessed from the file name), the result is an unreadable > mess which mostly consist of red markers pointing out supposed errors > in, well, pretty much everything. > > Using Python syntax highlighting produces much better results, and > in fact these files already start with specially-formatted comments > that instruct Emacs to process them as if they were Python files. > > This commit adds the equivalent special comments for vim. > > Signed-off-by: Andrea Bolognani <abolo...@redhat.com>
Naming QAPI schema files .json even though their contents isn't was a mistake. Correcting it would be a pain. If we correct it, then the sooner the better. Renaming them to .py gives decent editor support out of the box. Their contents isn't quite Python, though: true vs. True, false vs. False. Do we care? Only a few dozen occurences; they could be adjusted. Renaming them to .qapi would perhaps be less confusing, for the price of "out of the box". Thoughts?