microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 767 forks source link

feature: Add space after auto-completing "from" and "import" words on import lines. #6615

Closed wbender-wurl closed 3 weeks ago

wbender-wurl commented 3 weeks ago

Frequently I will type and accept auto-completions when importing modules and expect something like this

fro[tab]
v
from module_na[tab]
v
from module_name imp[tab]
v
from module_name import attr_func_na[tab]
v
from module_name import attr_func_name

Above is very natural feeling if intellisense adds a space when it makes sense after import and from.

But what ends up happening in vsocde-python

fro[tab]
v
frommodule_ #oops have to backspace and manually add space
v
from module_[tab]

I realize some people have the muscle memory of typing space after completing from and import and some do not. This might be better off as a toggle-able setting.

rchiodo commented 3 weeks ago

Thanks for the suggestion. Transferring to a discussion item for up votes.