Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins/hooks inside ctags pipeline processing #6

Open
amerlyq opened this issue Feb 6, 2020 · 1 comment
Open

Plugins/hooks inside ctags pipeline processing #6

amerlyq opened this issue Feb 6, 2020 · 1 comment

Comments

@amerlyq
Copy link

amerlyq commented Feb 6, 2020

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:[email protected]

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.

@masatake
Copy link
Member

masatake commented Feb 6, 2020

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.

@masatake masatake transferred this issue from universal-ctags/ctags Mar 31, 2020
@masatake masatake transferred this issue from universal-ctags/libreadtags Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants