Skip to content
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

sync files with language server #879

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

justinmann
Copy link

@justinmann justinmann commented Feb 22, 2025

  • Created a custom FileSystemProvider to capture file changed
  • Send file change/delete via new websocket message on the existing channel
  • Use a /tmp folder path so the server can safely persist the files to disk
  • Use file update time to make sure out-of-order websocket message does not overwrite a valid version
  • Add getWorkingCopyServiceOverride so it autoSave setting would work
  • defaultHtmlAugmentationInstructions was adding a div with no class that was screwing up the layout which is why your CSS needed to use "95vh". This approach makes it scales to 100% of parent which is much easier to use that viewport fixed percentage.
  • Sends a "pipInstall" command that create a venv on the servers and installs from requirements.txt

TODO:

  • The custom websocket message needs to be filtered out and not forwarded to Pyright not sure how to do this
  • Debugger needs work, I had to disable it because it seems to have its file syncing but one-time
  • If you add a new file, then pyright does not detect it and will fail to import. I tried to add --verbose to pyright to debug this, but I cannot see any output. "createServerProcess" seems to be messing around with stdout, so I have no idea where the logs for pyright are going.
  • Get imports from external libraries to work, according to the import resolution for PyRight it seems to assume a single project is running. I have no idea how to convince it use the venv for each active workspace.
    https://github.com/microsoft/pyright/blob/main/docs/import-resolution.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant