0

Can someone share instructions how can I get working imenu support with Fabian Gallina's python.el?

This is the commit that introduced imenu support, but my understanding of elisp is very low:

https://github.com/fgallina/python.el/commit/938e03cf6cdfcc30de84a4ec428aef9ff3c0c852

Currently I opened python file (major mode is python) and pressed M+x imenu, but got:

No items suitable for an index found in this buffer

PS M-x python-imenu- does not display any functions. Can this be the problem?

1 Answer 1

4

I have resolved it like this:

(add-hook 'python-mode-hook
  (lambda ()
    (setq imenu-create-index-function 'python-imenu-create-index)))

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.