The outline mode for python is a little un-useful, because in addition to showing classes and their "member attributes" (the methods), it shows the attributes of methods (and functions) which is just every variable assigned in a method or function. Showing these renders the outline view very verbose and not really much of an outline at all. It also shows all the imports in the module, which again is really not the point of an outline.
Is there any way to configure Python mode in VSCode so that the outline only shows classes, functions and methods?
Bookmark this question. Show activity on this post. The outline mode for python is a little un-useful, because in addition to showing classes and their "member attributes" (the methods), it shows the attributes of methods (and functions) which is just every variable assigned in a method or function.
Open the visual studio code, click File —> New File menu item, input the below python source code into the new file, and save it to a local file (test.py) with .py extension. Right-click the above file content in visual studio code, click the Run Current File in Interactive Window menu item in the popup menu list to run the python script.
VS Code 1.40 adds the ability to filter the Outline view. Search for settings like "outline.showVariables" to see all the options. Show activity on this post. There does not seem to be. The ms-python.python extension could provide a feature to control how the outline is displayed by the outline in vscode. It does not currently do so.
1. How To Configure Python Environment In Visual Studio Code. Open visual studio code and click the extensions option on the left bottom of the main interface. You can also click the View —> Extensions menu item at the top of the visual studio code to open the extensions option panel.
VS Code 1.40 adds the ability to filter the Outline view. Search for settings like "outline.showVariables"
to see all the options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With