Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jedi lists protected members (_field) of classes #266

Open
jlumbroso opened this issue Apr 25, 2016 · 1 comment
Open

Jedi lists protected members (_field) of classes #266

jlumbroso opened this issue Apr 25, 2016 · 1 comment

Comments

@jlumbroso
Copy link

I am wondering whether there is a way to hide certain members of a user-defined module.

Indeed, I write Python modules, and these import other packages, which I would like not appear in the autocomplete provided by Jedi. Initially, I tried hiding all the imports with a leading underscore (to mark them as protected/hidden) but this did not work.

@syohex
Copy link
Collaborator

syohex commented Apr 26, 2016

It is jedi specification, not emacs-jedi. emacs-jedi shows candidates which are collected by jedi.

NOTE: I suppose you can hide symbols which start with _ by following code. (advice-add can be used on Emacs 24.4 or higher version).

(advice-add 'jedi:ac-direct-matches
            :before (lambda ()
                      (setq jedi:complete-reply
                            (cl-loop for r in jedi:complete-reply
                                     for word = (plist-get r :word)
                                     unless (string-match-p "\\`_" word)
                                     collect r))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants