I would like to propose an enhancement in code editor.
When you hover mouse on a variable, a tooltip is popped-up with message: "This is a (string/integer/list/bool/..etc)".
It is interesting for me and the team that I work with, that the value of the variable is popped-up(if it is already on variable explorer). Otherwise, continue to show "This is a ....." message.
The reason it that when we are debugging a code, it is not so efficient to look for variables in variable explorer or type it in IPython console.
Therefore, I propose something like this bellow:
I made an initial version of this changing codeeditor.py, class CodeEditor, method _handle_hove as follows:
text = self.get_word_at(pos)
value = None
if text:
try:
main = self.window()
shell = main.ipyconsole.get_current_shellwidget()
if shell:
value = shell.get_value(text)
if value is not None:
from qtpy.QtWidgets import QToolTip
QToolTip.showText(
self.mapToGlobal(pos),
f"{text} = {repr(value)}"
)
return
except Exception:
pass
I hope I can implement this enhancement with you approval. Thanks in advance.
I would like to propose an enhancement in code editor.
When you hover mouse on a variable, a tooltip is popped-up with message: "This is a (string/integer/list/bool/..etc)".
It is interesting for me and the team that I work with, that the value of the variable is popped-up(if it is already on variable explorer). Otherwise, continue to show "This is a ....." message.
The reason it that when we are debugging a code, it is not so efficient to look for variables in variable explorer or type it in IPython console.
Therefore, I propose something like this bellow:
I made an initial version of this changing codeeditor.py, class CodeEditor, method _handle_hove as follows:
I hope I can implement this enhancement with you approval. Thanks in advance.