universal-ctags/issues-we-will-not-fix-in-soon

Plugins/hooks inside ctags pipeline processing

Opened this issue · 1 comments

I wish for being able to annotate tags by their author (from git blame).
How can it be reasonably achieved?

The tags output you expect:

main	foo.c	/^main(void)$/;"	kind:function	line:2	blame:john@doe.com

I suppose it's quite possible to do through external wrapper script to annotate tags fed from ctags output.
But can I achive the reverse thing -- plug this script into the middle of ctags pipeline?
Which benefits could it provide comparing with plugging it after ctags?

I strive for most naturally flowing solution.

Interesting idea. I myself want to implement it. However, I have no time.

I would like to write how I will do.
First of all, I think attaching the blame fields should be done in out of u-ctags; implanting a command processing tags file is better.

The command can use readtags.[ch] (https://github.com/universal-ctags/ctags/tree/master/read).
However, you may want to more functions to the API readtags provides.

  • a function for writing tags entries, and
  • a function attaching an extra field to the data structure representing tag entry.