Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.83k stars 253 forks source link

manual only reindex ? #1371

Closed mckellyln closed 4 years ago

mckellyln commented 4 years ago

Hi,

Thank you for rtags. I use it every day and it is awesome. I was wondering if I could do something like: 1). disable auto-reindexing based on file mods 2). later on somehow mark index db as up-to-date

What I am getting at is I may index a branch and then git stash and change branches just to check something out (not build) and then when I switch back to my work branch I want to tell rtags the index db is up to date / valid and not have it re-index everything again unneccessarily.

Does anyone else have this use case or suggestion ?

I was also looking into ccache for compiling and wondering if something like that would also be interesting here.

thx, -m

fperies commented 4 years ago

Hello,

Have you tried to play with the 2 following commands ?: Suspend indexation: rc -X all Resume indexation: rc -X clear

The suspend should allow you to switch branch and resume when you come back.

mckellyln commented 4 years ago

Thank you, I will try these things now. But lets say the source code changed because I switched branches, but then some time later changed branches back to be what it was originally when I first indexed everything. Does a rc -X clear Then accept the db is up to date or does it see that 1000s of files have a new date (even tho they are really unchanged) and then re-index it all ? I am excited to try. take care,

mckellyln commented 4 years ago

I see --suspend (-X) in the rc man page, but do not see the additional all/clear arg, I'll go look at the src.

mckellyln commented 4 years ago

I maintain a version of vim-rtags. I will add rc -X support to it :-) Thanks so much for this large productivity gain.