preservim / tagbar

Vim plugin that displays tags in a window, ordered by scope
https://preservim.github.io/tagbar
Other
6.12k stars 486 forks source link

Generating tags or getting current cnf file #746

Closed Hezkore closed 3 years ago

Hezkore commented 3 years ago

So I'm wondering if there's a way to make tagbar save a tags file automatically on document save. Or alternatively, is there a way to get the current cnf file used by tagbar, and in turn make some sort of autoload script that saves the tags using the current cnf file?

alerque commented 3 years ago

If I'm understanding your need correctly something like vim-gutentags might work for you. This plugin goes to pretty great lengths to not need to write to a tags file at all and to not mess up any handling thereof. If you want to keep a tags file up to date in your projects a plugin that is designed just for doing that would be better suited.

alerque commented 3 years ago

Also note that easytags is another alternative for tag file management.

The README explicitly documents under What Tagbar is not that we don't plan on adding support for managing tag files. I'd be happy to see useful integrations with plugins that take care of that sort of things (e.g. if easytags or gutentags exists, optionally use those generated files instead of building own own tags), but becoming a tag file manage is kind of a different kettle of fish and I don't think this has any business going there.

alerque commented 3 years ago

cf. #196