You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a VS Code workspace like the one above that contains a virtual folder and also at least one local folder
Open a virtual Python file in the workspace (if using the MemFS extension, run the "MemFS: Create Files" command and open file.py)
Hover over a function name like print or base64.decode and notice that no IntelliSense tooltip is shown
Remove local folders from the workspace (comment them out in the workspace file) and reload VS Code
Open the same virtual Python file and hover over a function name again, now tooltips are shown
Expected behavior
Pylance should always provide IntelliSense for documents with custom URI schemes, including when I am in a multi-root workspace. This is an important use case for extensions that depend on custom schemes, like Zowe Explorer which uses a FileSystemProvider to manage Python (and other) files stored remotely on a z/OS mainframe.
Actual behavior
IntelliSense does not work for virtual files inside a workspace that also contains a local folder. It also does not work if a virtual file is opened in a VS Code window without a workspace and with a local folder open, although this cannot be easily tested with the MemFS extension.
Thanks for the issue. By default, Pylance doesn't support virtual workspaces. It's because of how the underlying Pyright server needs to be able to read all of the imports from a relative location and in a synchronous manner (making it difficult to use the VS code file system apis to read the files).
There is however an experimental version of Pylance that synchronizes the VS code file system API in order to make this possible. It's not 100% working at the moment but you can try it out with this setting here:
Theoretically that will allow Pylance to read files from your virtual file system as if they were just on the actual disk.
Environment data
Code Snippet
Example of multi-root VS Code workspace containing both a virtual folder and a local folder:
Repro Steps
file.py
)print
orbase64.decode
and notice that no IntelliSense tooltip is shownExpected behavior
Pylance should always provide IntelliSense for documents with custom URI schemes, including when I am in a multi-root workspace. This is an important use case for extensions that depend on custom schemes, like Zowe Explorer which uses a
FileSystemProvider
to manage Python (and other) files stored remotely on a z/OS mainframe.Actual behavior
IntelliSense does not work for virtual files inside a workspace that also contains a local folder. It also does not work if a virtual file is opened in a VS Code window without a workspace and with a local folder open, although this cannot be easily tested with the MemFS extension.
Logs
The text was updated successfully, but these errors were encountered: