Closed yanglimingcn closed 4 years ago
I think it is because you are only setting variable ggtags-mode
to t and not actually activating the ggtags minor-mode. Normally you should activate this way:
(add-hook 'c-mode-common-hook
(lambda ()
(when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
(ggtags-mode 1))))
Change c-mode-common-hook
to other major mode hook if not c,c++,java.
In this case, I just jump to the project root, not open one file of the project. so no language mode will be enabled. BTW when open this directory, ggtags-mode is enabled, but mode-line can not see the project name. but in minor mode set I can see GG
Because you are setting var ggtags-mode in your dir-locals which doesn’t do what you want. you need to activate minor mode this way instead: M-: (ggtags-mode t) RET
OK,thanks
.dir-locals ((nil (ggtags-process-environment "GTAGSFORCECPP=" "GTAGSLABEL=gtags")) (nil (ggtags-mode t))) ;;;;;;;;;;;;;;;; when open this directory, ggtags-mode is enabled, but mode-line can not see the project name. ggtags-mode-line-project-name is enabled