[libvirt] [PATCH 0/2] Add support for some useful vim plugins

Andrea Bolognani posted 2 patches 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1493389250-8694-1-git-send-email-abologna@redhat.com
.color_coded.in       | 40 ++++++++++++++++++++++++++++++++++++++++
.gitignore            |  2 ++
.ycm_extra_conf.py.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
configure.ac          |  2 ++
4 files changed, 89 insertions(+)
create mode 100644 .color_coded.in
create mode 100644 .ycm_extra_conf.py.in
[libvirt] [PATCH 0/2] Add support for some useful vim plugins
Posted by Andrea Bolognani 6 years, 11 months ago
libclang can be integrated into vim in pretty useful
ways, notably to provide semantic syntax highlighting
and code completion.

This series enables basic support for both (through the
color_coded and YouCompleteMe plugin respectively) by
creating the required per-project configuration files
automatically at configure time.

Note that external libraries (eg. libxml2) are not being
processed at the moment, but even with this basic
configuration the plugins can be very useful. More
sophisticated support can be worked in later on.

Visual comparison:

  http://imgur.com/a/TBJsz

Andrea Bolognani (2):
  Add color_coded support
  Add YouCompleteMe support

 .color_coded.in       | 40 ++++++++++++++++++++++++++++++++++++++++
 .gitignore            |  2 ++
 .ycm_extra_conf.py.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
 configure.ac          |  2 ++
 4 files changed, 89 insertions(+)
 create mode 100644 .color_coded.in
 create mode 100644 .ycm_extra_conf.py.in

-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/2] Add support for some useful vim plugins
Posted by Daniel P. Berrange 6 years, 11 months ago
On Fri, Apr 28, 2017 at 04:20:48PM +0200, Andrea Bolognani wrote:
> libclang can be integrated into vim in pretty useful
> ways, notably to provide semantic syntax highlighting
> and code completion.

So presumably this requires users to have libclang installed
on their system. Perhaps worth a note in the HACKING file
about prerequisites and any VIM setup (if not 100% automatic)


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/2] Add support for some useful vim plugins
Posted by Andrea Bolognani 6 years, 11 months ago
On Fri, 2017-04-28 at 15:24 +0100, Daniel P. Berrange wrote:
> So presumably this requires users to have libclang installed
> on their system. Perhaps worth a note in the HACKING file
> about prerequisites and any VIM setup (if not 100% automatic)

Setting up the plugins themselves is non-trivial, as
unfortunately neither is packaged (at least not for Fedora
or Debian).

So the user is going to have to follow the instructions
provided by the plugin's authors, which include building
them from source. I think that's entirely out of scope for
our own documentation.

The upside is that users who have already set up the
plugins won't need to do anything specific for them to
work with libvirt, they will just pick up the respective
configuration files automatically.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/2] Add support for some useful vim plugins
Posted by Andrea Bolognani 6 years, 11 months ago
On Fri, 2017-04-28 at 16:38 +0200, Andrea Bolognani wrote:
> The upside is that users who have already set up the
> plugins won't need to do anything specific for them to
> work with libvirt, they will just pick up the respective
> configuration files automatically.

And, it goes without saying, people who have not setup
the plugins in question will not be affected at all by the
presence of their configuration files :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/2] Add support for some useful vim plugins
Posted by Daniel P. Berrange 6 years, 11 months ago
On Fri, Apr 28, 2017 at 04:38:18PM +0200, Andrea Bolognani wrote:
> On Fri, 2017-04-28 at 15:24 +0100, Daniel P. Berrange wrote:
> > So presumably this requires users to have libclang installed
> > on their system. Perhaps worth a note in the HACKING file
> > about prerequisites and any VIM setup (if not 100% automatic)
> 
> Setting up the plugins themselves is non-trivial, as
> unfortunately neither is packaged (at least not for Fedora
> or Debian).
> 
> So the user is going to have to follow the instructions
> provided by the plugin's authors, which include building
> them from source. I think that's entirely out of scope for
> our own documentation.
> 
> The upside is that users who have already set up the
> plugins won't need to do anything specific for them to
> work with libvirt, they will just pick up the respective
> configuration files automatically.

Ok, well perhaps just put a quick note in HACKING that we ship these
config files, and provide a link to the upstream plugin which describes
it further.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/2] Add support for some useful vim plugins
Posted by Andrea Bolognani 6 years, 11 months ago
On Fri, 2017-04-28 at 15:52 +0100, Daniel P. Berrange wrote:
> Ok, well perhaps just put a quick note in HACKING that we ship these
> config files, and provide a link to the upstream plugin which describes
> it further.

I couldn't find an existing section where this would fit,
so I created a new one called "Tooling" (see patch 3/2).

I've only documented the vim plugins so far, but we should
also document 'make tags' later on, plus any other similar
tool that I'm forgetting at the moment.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list