Closed jadestrong closed 5 months ago
Hi @jadestrong sorry I overlooked this question. Does /workspace
exist on your machine? This example assumes it is there.
Yes, this directory does not exist. If only the directory exists, it will also prompt that the python.py
file does not exist, so for each file opened by the editor, it is necessary to create a file with the same name in the workspace directory?
But the languageclient passes the content of the open file to the LS, right? So if your are only interested in the content of the editor it should not matter. I will come back with a more solid answer after testing it.
Yes, if you only open one file, it seems ok, but if you open multiple files and reference each other, it will throw a diagnostic error like this:
After the corresponding blank file has been created in the
/workspace
directory , it works fine.
@jadestrong when the pyright runs in vscode the file-creations on the client side are present on the server side directly as they both use the same file system. With this architecture (separated file system of both client and server) you have to ensure this via language server prototcol https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_willCreateFiles on your own
@jadestrong I will close this issue here as the code moved to https://github.com/TypeFox/monaco-languageclient If you see the need to please open a new issue or discussion there.
Is there a way to solve the problem of remote deployment of pyright-langserver being unable to access source files?