Extension switches back to Jedi when reloading after setting Pylance as the default language server
See original GitHub issueEnvironment data
- VS Code version: 1.49.3
- Extension version (available under the Extensions sidebar): v2020.9.114305
- OS and version: Windows 10 2004
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions:
- Relevant/affected Python-related VS Code extensions and their versions: Pylance (v2020.10.0)
- Value of the
python.languageServer
setting: Jedi
Expected behaviour
Changed the language server to Pylance, and it should stay Pylance.
Actual behaviour
Pylance extension suggests me to change to it’s language server.
Click ‘Yes, and reload’
settings.json
Python extension changes the language server back to Jedi and asks me to reload
I go check settings.json and to my surprise:
Steps to reproduce:
-
Install Python extension and Pylance extension.
-
Create Python ‘project’ with these settings in .vscode
settings.json:
{
"python.pythonPath": "C:\\Users\\tiago\\AppData\\Local\\Programs\\Python\\Python38\\python.exe"
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal"
}
]
}
- Python code:
print('hello')
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Pylance Now Default Language Server for Python in Visual ...
"Today, we're excited to announce that the Python extension's default language support is now powered by Pylance, said Savannah Ostrowski, ...
Read more >How to switch vscode to use pylance rather than jedi?
I've downloaded the default Python extension, but only the jedi language server is running. How can I make the switch? EDIT: Adding a...
Read more >Language Server Extension Guide - Visual Studio Code
Learn how to create Language Servers to provide rich language features in Visual Studio Code.
Read more >Python in Visual Studio Code – May 2021 Release
We're thrilled to announce that Pylance is now the default language server for Python and is bundled with the core Python extension as...
Read more >Pylance: our new and improved Python experience in VS Code
Get a glimpse of the most performant and user-friendly editing experience for Python in VS Code ever. The newest version of the extension...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for confirming. For reference, it’s this way because before the languageServer setting was the only setting, jediEnabled needed to be set explicitly to false to get any LS to work. Now jedi is “just another LS setting”, but for compatibility we had to roll people forward; explicitly setting jedi to true meant that we were forcing it to be the LS.
There’s a TODO to remove this, as at this point I’m not expecting there to be many machines configured this way intentionally anymore.
Can you check that file to see if there’s a setting
python.jediEnabled
, even commented out?