leoliu / ggtags

Emacs frontend to GNU Global source code tagging system.
http://elpa.gnu.org
578 stars 56 forks source link

Is there an option to override project root? #201

Closed yanqianglu closed 4 years ago

yanqianglu commented 4 years ago

Hi,

I have projects setup like:

~
|--projects
        |--projectA
        |--projectB

I generated GTAGS at ~/projects but have projectile setup for each sub-project ~/projects/projectA and ~/projects/projectB.

It seems like ggtags use projectile to find the project root, and it always pointed to those sub projects. Since ggtags-project-root is a buffer local variable, I wasn't able to override it by neither setq nor project local variable .dir-locale. I'm wondering is there a way to override the project root or disable the projectile inferring?

Thanks, Louie

leoliu commented 4 years ago

The project root is normally where global considers its project root e.g. global -pr.

yanqianglu commented 4 years ago

Got u, it turned out I didn't delete the G* files in the sub project directory. After deleting them and only keeping the GTAGS, etc files in the root directory, problem solved. Thanks for the help!