liximomo / vscode-remote-fs

Working with any file in everywhere with vscode.
MIT License
166 stars 17 forks source link

Extensions do not work with RemoteFS #91

Open ogcsantos opened 3 years ago

ogcsantos commented 3 years ago

well, I'm having problems using the formatter or Intelephense of some language in my code using RemoteFS, I just can't, and below it shows an error of one of the extensions that I use outside of RemoteFS.

image

e-u-shapovalov commented 3 years ago

Describe the bug PHP code intelligence for Visual Studio Code don't work via Remote File System for VS Code

To Reproduce Open php file via Remote File System for VS Code

Screenshots 2021-04-05_22-09-36

Platform and version OS WIN10 and Intelephense version v1.6.3.

PeterWone commented 2 years ago

Extensions that don't work with remote filesystems are generally written incorrectly (like mine, which I am currently fixing in this respect).

They import fs and use the node filesystem methods. What they should do is use the filesystem object provided by the vcode API, and instead of using filepath strings they should use the vscode.Uri objects returned by most of the UI interaction events. These URIs are annotated as to the filesystem in which they should be resolved. If you use the methods on the file system object available from vscode.workspace.fs you have access to both local and remote filesystems.

If you have a particular extension in mind raise an issue on the pertinent repo and tell the author to read this comment (you should be able to copy a direct link) and then they should refer to this documentation link https://code.visualstudio.com/api/references/vscode-api#FileSystem