tmm1 / ripper-tags

fast, accurate ctags generator for ruby source code using Ripper
MIT License
550 stars 43 forks source link

Handle '--append' for Vim and Emacs. #84

Closed k3rni closed 4 years ago

k3rni commented 6 years ago

Obviously needs more tests, but submitting a working version.

Vim and JSON formatters are simple - read existing tags, merge with new ones, output. For emacs, the procedure is more involved since the entries are grouped into sections per tag's file. Read the file, remove stale tags as we output new ones, and dump the rest when flushing a section. When all new tags are processed, output what remains.

RRethy commented 4 years ago

Anything left on this PR to get it shipped?

mislav commented 4 years ago

@k3rni Thank you for the contribution and sorry it took me so long to react to it.

I had felt that the added code constituted too many changes to the main vim/emacs formatters, and that the approach of potentially keeping outdated tags for newly processed files felt wrong to me (even though this is how universal-ctags implements it). Inspired by your feature, I had taken another approach and ended up with something that I was satisfied with and that I think has little chance of negatively affecting non-append tag generation.