Auto completion doesn't show values of variables whose value is known #813
Labels
area-intellisense
LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.
feature-request
Request for new features or functionality
Uh oh!
There was an error while loading. Please reload this page.
Environment data
VS Code version: 1.20.1
Python Extension version: 2018.1.0
Python Version: 2.7.12
OS and version: Ubuntu 16.04.3 amd64
Actual behavior
The auto completion support doesn't show the value of variables whose value is known which the autocomplete-python[-jedi] extensions for Atom does show. (The code in this extension seems copied and modified from it).
Expected behavior
It should show them like the extension for Atom does. The code in
completion.py
is already there. It's a matter of wiring it up into the VS Code API nicely (It's something the extension for Atom implemented and not a pure stock feature of Jedi).Showing the values of stuff is done by this bit of code:
https://github.com/Microsoft/vscode-python/blob/fafd0f8888b8d6a9a995b8da4495c8a83d3f9a9e/pythonFiles/completion.py#L60-L70
Called from here:
https://github.com/Microsoft/vscode-python/blob/fafd0f8888b8d6a9a995b8da4495c8a83d3f9a9e/pythonFiles/completion.py#L220
It shows it on the right hand side of a completion suggestion. VS Code is calculating this but than not using this property. Only showing the doc string for the type of the completion which is what we are seeing (I think it might even be getting the doc string by itself rather than relying on Jedi).
Steps to reproduce:
SPA
below:Screenshots
Atom
VS Code
P.S. The code throws a bunch of lint warnings from a linter like flake8, and in particular
ARGUMENT_RE
is not defined for this bit of code:https://github.com/Microsoft/vscode-python/blob/fafd0f8888b8d6a9a995b8da4495c8a83d3f9a9e/pythonFiles/completion.py#L254-L255
Though it's probably currently unused by this extension.
Originally: #171 (comment)
@MikhailArkhipov
The text was updated successfully, but these errors were encountered: