srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

Hover for function definition does not work with MagicPython #291

Open fhchl opened 5 years ago

fhchl commented 5 years ago

I am not sure if this is a bug in MagicPython or SublimeJEDI.

On my machine, hovering over a Python function does not show the tooltip with the function definition and docstring when MagicPython is used. However, it does work with the default Python package.

Using the context menu option works in both cases.

ST 3207 SublimeJEDI 0.14.0 MagicPython 1.1.1

dhelonious commented 5 years ago

I can confirm this. The reason is that SublimeJEDI will show docstrings only on scopes source.python & (variable | entity.name). The default Python syntax assings the following scopes to functions:

MagicPython on the other hand will only assign the scopes

Therefore the & variable condition is not met. The same holds for PythonImproved.

srusskih commented 5 years ago

https://github.com/srusskih/SublimeJEDI/blob/master/sublime_jedi/helper.py#L82

fhchl commented 4 years ago

Any idea how one could make these compatible? I could help to implement that.