|
From: | Eric Blake |
Subject: | Re: [Qemu-devel] [PATCH] qapi: Add vim magic modelines for qapi definitions |
Date: | Wed, 5 Dec 2018 15:49:06 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 12/5/18 10:20 AM, Markus Armbruster wrote:
The vim plugin doesn't have an equivalent, however, the documentation suggest vim_filetype, but you need to add to .vimrc: function! FiletypeHook(config) if has_key(a:config, 'vim_filetype') let &filetype = a:config['vim_filetype'] endif return 0 " Return 0 to show no error happened endfunction call editorconfig#AddNewHook(function('FiletypeHook')) I think this is a better solution than having to add modelines everywhere, what do you think?These .json files are not valid JSON. They *are* valid Python (except for a few tests, which could perhaps be fixed). Makes me wonder why on earth we insist on naming them .json and create all this trouble.
I've previously posted patches that bulk-renames the QAPI files from .json to .qapi, but too close to a release cycle to be applied at the time. I'd have to refresh them to match new files in the meantime, but as long as we are arguing that editorconfig is a smart way to go, it's a fairly simple tweak to editorconfig to match the preferred suffix we use for QAPI files.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |