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
elpy-xref--goto-identifier gets confused by strings, which breaks definition jumping. I suggest removing this call from elpy-xref--definitions since jedi will find the definition regardless of where in the identifier your cursor is.
Steps to reproduce
create a buffer with:
{"bar": self.bar}
move to the b in self.bar
M-x eval-expression RET (elpy-xref--goto-identifier "1: bar") RET
you'll end up at the b in "bar".
My configuration
OS
Mac OS X 10.12.6 (16G1510)
Result of (elpy-config)
Elpy Configuration
Virtualenv........: hail-batch (/Users/dking/anaconda2/envs/hail-batch)
RPC Python........: 3.6.7 (/Users/dking/anaconda2/envs/hail-batch/bin/python)
Interactive Python: python (/Users/dking/anaconda2/envs/hail-batch/bin/python)
Emacs.............: 26.1
Elpy..............: 1.27.0
Jedi..............: 0.13.1
Rope..............: 0.11.0
Autopep8..........: 1.4.3
Yapf..............: 0.25.0
Black.............: Not found (18.9b0 available)
Syntax checker....: flake8 (/Users/dking/anaconda2/envs/hail-batch/bin/flake8)
The directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables in that
directory, so Emacs won't find them. If you are missing some commands, do add
this directory to your PATH -- and then do `elpy-rpc-restart'.
The black package is not available. Commands using this will not work.
[run] python -m pip install black
Options
`Raised' text indicates buttons; type RET or click mouse-1 on a button to invoke
its action. Invoke [+] to expand a group, and [-] to collapse an expanded
group. Invoke the [Group], [Face], and [Option] buttons below to edit that item
in another window.
[+]-- Group Elpy
[+]-- Group Python
[+]-- Group Virtual Environments (Pyvenv)
[+]-- Group Completion (Company)
[+]-- Group Call Signatures (ElDoc)
[+]-- Group Inline Errors (Flymake)
[+]-- Group Snippets (YASnippet)
[+]-- Group Directory Grep (rgrep)
[+]-- Group Search as You Type (ido)
[+]-- Group Django extension
[+]-- Group Autodoc extension
Elpy configuration in my init.el
(elpy-enable)
The text was updated successfully, but these errors were encountered:
elpy-xref--definitions needs to return the definition of the given identifier, not of what is under point.
This is needed for the functions xref-apropos and xref-references.
The problem you face is due to my choice of choosing the line number and the function/variable/class name as an identifier (1: bar in your example).
We could consider using the column number as well (1:14: bar for example) if you think it is a big issue.
The drawback is a slightly more ugly selection candidates when using xref-find-references.
Summary
elpy-xref--goto-identifier gets confused by strings, which breaks definition jumping. I suggest removing this call from
elpy-xref--definitions
since jedi will find the definition regardless of where in the identifier your cursor is.Steps to reproduce
create a buffer with:
move to the
b
inself.bar
you'll end up at the
b
in"bar"
.My configuration
OS
Mac OS X 10.12.6 (16G1510)
Result of
(elpy-config)
Elpy configuration in my init.el
The text was updated successfully, but these errors were encountered: