0

I followed instructions here: https://github.com/leoliu/ggtags

I've enabled the following:

(add-hook 'c-mode-common-hook
          (lambda ()
            (when (derived-mode-p 'c-mode 'c++-mode 'python-mode)
              (ggtags-mode 1))))

However, when I activate ggtags-mode, and try to use M-. on an item, global always returns 0 matches. I have pygments installed, and I have a GGTAGS file, but it doesn't seem to find any matches on even simple functions like open().

When I use elpy-mode, however, I can use M-. and get exactly the behavior I expect. I am interested in getting exuberant tags to work rather than python because I understand it is designed to work multi-language: http://ctags.sourceforge.net/languages.html including python.

  • 1
    Does python-mode run c-mode-common-hook? I would have thought you should add your code to prog-mode-hook instead. – InHarmsWay Jun 26 '20 at 9:56
  • Can you explain what that means please? – Mittenchops Jun 26 '20 at 14:22
  • Substitute prog-mode-hook for c-mode-common-book in your code above. Then the code should run when you open a python file. – InHarmsWay Jun 28 '20 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.