emacs-configuration
emacs-configuration copied to clipboard
elpy-occur-definitions integrated with helm
occur searches for occurrences in the current buffer, and elpy- uses a regex to search only for classes and functions. So, I want to integrate them with helm.
The problem is that elpy- and occur open a new buffer instead of returning a list of candidates (which is needed by helm as input).
(defun helm-elpy-occur-definitions ()
(interactive)
(helm :sources (occur "^ *\\(def\\|class\\) ")
:buffer "*helm elpy occur definition*"))
(helm-occur)
does exactly what I want, but I didn't find a way yo call it with a pre-defined regex
Regex passed to helm-occur to get the same result ^ *\(def\|class\)