Wednesday, September 19, 2012

Re: dynamic syntax highlighting

[ Quoting <miek@miek.nl> in "Re: dynamic syntax highlighting..." ]
> It's even easier, the syntax highlighting file uses <lang>Type, so

On https://github.com/miekg/tagbar is a test/alpha implementation of
a plugin (modified from the original tagbar) that adds syntax highlighting
for user defined types. It only tested for Go code.

Interesting bits here:
https://github.com/miekg/tagbar/commit/693f26a1d54ae3122b666d7fc5b052e8559d7946#L0R2428

Issues:

* Only works if the type is defined in the current file (maybe tagbar can handle
multiple files as well, don't know)
* I'm using 'windo' which may be a bit blunt
* Throw away stuff from tagbar I don't need


Regards,

--
Miek Gieben http://miek.nl

No comments: