qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: Peter Krempa <pkrempa@redhat.com>, QEMU <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] qapi: Add vim magic modelines for qapi definitions
Date: Wed, 5 Dec 2018 15:49:06 -0600	[thread overview]
Message-ID: <c72d80b5-5996-eb78-58ca-6764278dab54@redhat.com> (raw)
In-Reply-To: <87tvjsq71s.fsf@dusky.pond.sub.org>

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

      reply	other threads:[~2018-12-05 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04  7:03 [Qemu-devel] [PATCH] qapi: Add vim magic modelines for qapi definitions Peter Krempa
2018-10-04 11:34 ` Peter Krempa
2018-12-05 12:33   ` Peter Krempa
2018-12-05 14:09     ` Marc-André Lureau
2018-12-05 16:20       ` Markus Armbruster
2018-12-05 21:49         ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c72d80b5-5996-eb78-58ca-6764278dab54@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).