-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Only show python status bar item when you are in a python file #10609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @mjbvz! I feel that this wouldn't be helpful for those who are working on web applications such as Django or Flask. If you have js file open or even html/css, it could still part of the Python application. Even if we hide this information when other files are open, when users open the terminal the environment will still be activated in the terminal since the Python extension is activated. This could be unexpected as the environment info isn't displayed. Related to that, having the interpreter information there gives a quick an easy way to just spot if the Python extension is actually activated in that workspace. Anyway, I'm adding a "needs decision" label so I can discuss this further with the team. |
We faced the same considerations for JS/TS. We decided to only show the status item when in js/ts files. If I'm editing a python file for example, I don't care what version of TypeScript is being used for my client side code. If the terminal is the concern, I believe python is only activated in specific terminals (such as using The status bar does not have a lot of real estate and the python status bar entry takes up a lot of space, so please be considerate of other extensions here |
If you run the "Terminal: Create New Integrated Terminal" command (or simply click on the + button to create a new one), it will automatically activate the environment. We also had requests to activate the first open terminal as well (e.g. #5330), but it turned out to be an opt-in feature for those who would like this functionality.
Sorry, I don't think I quite understand that. The Python extension activates only when you open a Python file or when you run a Python command. We then display the Python version on the status bar (which is a valuable information when you're dealing with Python, as you may have tons of interpreter on your machine and usually there is the right one you want to pick for your project).
There's always the workaround of hiding this information for those who find it useless (by right clicking on the status bar and unselecting the Python option). But we're talking about the default experience for all of our users, and for that I strongly believe this is an important information to be displayed even if you're working with other type of files (e.g. we support template debugging, and in that case the Python interpreter will display the information of which environment will be used to launch the debug session, even though you're focused on a html file). In any case, I will discuss this further with the rest of the team, and we're also leaving here the opportunity for others to comment and upvote this issue if they agree with this request 😊 |
Closing as we now only show it for Python files and settings. Related follow up issue: #18930 |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Language serverpython.languageServer
setting: MicrosoftRepro
Open a
.py
file in VS CodeNow open a js file (and make sure the python file is closed)
Bug
The python info still shows in the status bar:
In general, the status bar should only show information that is relevant for working in the current file. The python version info is not helpful when are editing a JS or markdown file
Related
The text was updated successfully, but these errors were encountered: