How to enable auto-indentation of Python function arguments in VS Code

This is a known issue for the Python VSCode extension and it can currently not be fixed because of limitations in the extension API. More specifically the line in the editor cannot know the content of other lines. I am not aware of any fix for this issue, but I agree that it decreases the experience of working with VSCode by far.

See this issue for further information: https://github.com/Microsoft/vscode-python/issues/701


Like @larsl already wrote, this is currently a limitation of the basic Microsoft python extension. However, fellow VS Code user Kevin Rose was so kind to write an extension that does exactly what we were looking for:

https://marketplace.visualstudio.com/items?itemName=KevinRose.vsc-python-indent

As far as my early experience with it goes, it works like a charm!