aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema
diff options
context:
space:
mode:
authorAndrea Bolognani <abologna@redhat.com>2020-07-29 20:50:24 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-08-03 08:28:08 +0200
commitf7160f32186b4ae1e1327e3bd05060fffec8f9ae (patch)
treef6461a9fe688f87c9959f8f8f070abe4cd30e6f2 /tests/qapi-schema
parentfbeed197611bda439968e68a42d8efadb2e60f81 (diff)
downloadqemu-f7160f32186b4ae1e1327e3bd05060fffec8f9ae.zip
qemu-f7160f32186b4ae1e1327e3bd05060fffec8f9ae.tar.gz
qemu-f7160f32186b4ae1e1327e3bd05060fffec8f9ae.tar.bz2
schemas: Add vim modeline
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 <abologna@redhat.com> Message-Id: <20200729185024.121766-1-abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r--tests/qapi-schema/doc-good.json2
-rw-r--r--tests/qapi-schema/include/sub-module.json1
-rw-r--r--tests/qapi-schema/qapi-schema-test.json1
-rw-r--r--tests/qapi-schema/sub-sub-module.json1
4 files changed, 5 insertions, 0 deletions
diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.json
index ddd89d1..9da72a1 100644
--- a/tests/qapi-schema/doc-good.json
+++ b/tests/qapi-schema/doc-good.json
@@ -1,4 +1,6 @@
# -*- Mode: Python -*-
+# vim: filetype=python
+#
# Positive QAPI doc comment tests
{ 'pragma': { 'doc-required': true } }
diff --git a/tests/qapi-schema/include/sub-module.json b/tests/qapi-schema/include/sub-module.json
index afdb267..b9f7b9b 100644
--- a/tests/qapi-schema/include/sub-module.json
+++ b/tests/qapi-schema/include/sub-module.json
@@ -1,4 +1,5 @@
# *-*- Mode: Python -*-*
+# vim: filetype=python
# Sub-module of ../qapi-schema-test.json
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
index 6b1f05a..3a9f2cb 100644
--- a/tests/qapi-schema/qapi-schema-test.json
+++ b/tests/qapi-schema/qapi-schema-test.json
@@ -1,4 +1,5 @@
# *-*- Mode: Python -*-*
+# vim: filetype=python
# This file is a stress test of supported qapi constructs that must
# parse and compile correctly.
diff --git a/tests/qapi-schema/sub-sub-module.json b/tests/qapi-schema/sub-sub-module.json
index 524ef9b..94f36ec 100644
--- a/tests/qapi-schema/sub-sub-module.json
+++ b/tests/qapi-schema/sub-sub-module.json
@@ -1,4 +1,5 @@
# *-*- Mode: Python -*-*
+# vim: filetype=python
# Sub-module of sub-module include/sub-module.json of qapi-schema-test.json