PyLance is a very good language server for Visual Studio Code developed by Microsoft. Because of that MS has restricted the usage of PyLance to their own marketstore and distribution of VSCodium, titled Visual Studio Code. What MS does is it takes the open-source base (MIT) and republishes it under a different license. Their version contains telemetry and maybe other “MS features”.
Here is how you can make PyLance accessible under VSCodium, but there is a catch: these changes has to be made after every update of either PyLance or VSCodium.
Please note that all paths here are for the macOS version, the paths may change on other operating systems.
So let’s first change the file /Applications/VSCodium.app/Contents/Resources/app/product.js from VSCodium. You need change the values of the keys below:
{
“nameShort”: “Visual Studio Code”,
“nameLong”: “Visual Studio Code”,
“extensionsGallery”: {
“serviceUrl”: “https://marketplace.visualstudio.com/_apis/public/gallery”,
“cacheUrl”: “https://vscode.blob.core.windows.net/gallery/index”,
“itemUrl”: “https://marketplace.visualstudio.com/items”
}
}
As a second step you have to delete the extension.bundle.js file in the PyLance plugin folder, in my case the folder was:
/Users/myuser/.vscode-oss/extensions/ms-python.vscode-pylance-2023.10.12/dist/extension.bundle.js
Please note that every pylance update changes the path. here is was for version 2023.10.12
Now PyLance should start. Unfortunately PyLance is such an amazing language server and better than Jedi, so at least for me, it is worth the effort after every update.
MS is not an open-source company!