You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
le-python.el: Allow to chain method calls in Jython completion
* le-python.el (lispy-python-symbol-bnd): New defun.
(lispy-python-completion-at-point): Update.
* lispy-test.el (lispy-python-symbol-bnd): Add.
Suppose I want to end up with this:
detector.getDetectorProperties ().getOwner ().getProbeProperties ()
Previously, completion would work only here:
det|
and here:
detector.get|
Now, completion also works here:
detector.getDetectorProperties ().g|
How it works:
1. Store the longest complete method chain into a variable:
# Assume no side effects for eval, lol.
# Would be cool to statically derive the class.
__t__ = detector.getDetectorProperties ()
2. Request completions for e.g. "__t__.g".
3. Remove "__t__" from the resulting completions.
0 commit comments