pappasam / jedi-language-server

A Python language server exclusively for Jedi. If Jedi supports it well, this language server should too.
MIT License
626 stars 45 forks source link

Variable type not showing in hover window #295

Open scallaway opened 1 year ago

scallaway commented 1 year ago

I appreciate there has been a load of work done surrounding the hover window etc. over the years, but I think there's one last bit that's missing.

Currently, the information I'm seeing in the hover window (based on the JLS source code) is the following: image

I think what's crucially missing is the actual type of markup_kind in that context, as a result of calling _choose_markup(). I initially thought this information was stored in the "Full Name" field, but realised that's just the drill-down location of the variable.

image

Calling hover on _choose_markup() does indeed show def _choose_markup(server: JediLanguageServer) -> MarkupKind, therefore I find it reasonable to expect markup_kind to show that it's of type MarkupKind.

Basically, I'd expect to see the following in the dropdown window for markup_kind:

markup_kind [MarkupKind] = _choose_markup(server)

I have played around with the configuration, as well as going through the documentation, but haven't been able to come to a good solution for this.

I'm not 100% sure whether this is a bug or just a config issue, but any help on this would be greatly appreicated!

scallaway commented 8 months ago

This has been open for a while - I've just had another play around with Jedi again and it still shows the same information.

Any chance someone can have a look at this (or provide some insight)?