-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add instructions for PyLance workaround. #935
Conversation
As Jedi is always enabled if Pylance is not found wouldn't it be most reasonable to just uninstall/disable PyLance? I don't have any setting for this done, so it is on
|
Co-authored-by: Evan Boehs <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly fine, however I recommend correcting the typos and making some of the language more formal.
**Option 2: Make PyLance think you are running the official builds** | ||
If you want to use PyLance server, it is very easy to convince PyLance that it is running in an official build. As presented in [Issue 892](https://github.com/VSCodium/vscodium/issues/892#issuecomment-957850440), you simply need to modify a single entry in `product.json`. | ||
|
||
`The file can be found here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That extra ` may cause some issues:
`The file can be found here: | |
The file can be found here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these paths are already in the document, better reference this instead of adding it again
* **MacOS**: `/Users/<user>/Library/Application Support/VSCodium/product.json` | ||
* **Windows**: `%APPDATA%\VSCodium\product.json` | ||
|
||
Modify the followning line: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"following" is misspelt:
Modify the followning line: | |
Modify the following line: |
PyLance is Microsofts new [Python language server](https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/) which is one of the backend options for IntelliSense. This only works in the official VS Code builds. But there are two workarounds: | ||
|
||
**Option 1: Use the Jedi language server** | ||
Not much of a workaround, but one option is to not use PyLance and instead use the previous default: Jedi. This is done by adding the following line to `settings.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not much of a workaround, but
This could be more formal
Shouldn't this info just be added to Extensions Compatibility Wiki? |
I think adding a link to the workaround (or simple instructions to do so) in the "Replacements" section could be appropriate as Pylance is already stated there as only partially compatible. |
Also please refer: #940 (comment) |
``` | ||
or through the UI under "Python: Language Server" | ||
|
||
**Option 2: Make PyLance think you are running the official builds** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly insert Option 2: Use Pyright ?
Hello Sebastian! |
It looks like this no longer works as of version |
I'm closing this PR. Feel free to open a discussion if you want further talks. The best solution is to have an open alternative for PyLance instead of trying the make a closed-source extension works... |
Yeah, apparently starting from this version the product.json trick is not longer enough... 😭 |
If anyone still wants to bother with Pylance, the last working version can be found here. No need for the product.json trick. Just install VSCodium, install the extension and you are ready to go. Save it on your drive! Who knows for how long M$ will keep that link up. The checksum for the file for posterity.
|
Let's just attach it: The hashes are above^. |
Would it be reasonable to distribute that as a built-in extension by including it in the patchset or do we know/guess that this is/will soon be broken? |
Strangely I couldn't find any reasonable data source on differences between Pylance and Pyright (we all know that Pylance is based on Pyright). Does anybody have a clue? |
Actually there is some information in Pylance FAQ:
|
No! VSCodium doesn't add features compared to Visual Studio Code. Also PyLance is closed-sourced and can be installed only with MS products (https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license) |
Microsoft prevents PyLance language server from running in unofficial builds, but an easy workaround is to modify
product.json
.See #892.
I added instructions to the Docs.