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.

3
  • 1
    Does python-mode run c-mode-common-hook? I would have thought you should add your code to prog-mode-hook instead. Commented Jun 26, 2020 at 9:56
  • Can you explain what that means please? Commented Jun 26, 2020 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. Commented Jun 28, 2020 at 2:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.