Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

[Discussion] [Live Share] Restricting language services to local files #326

Merged
merged 2 commits into from
Apr 17, 2018
Merged

[Discussion] [Live Share] Restricting language services to local files #326

merged 2 commits into from
Apr 17, 2018

Conversation

lostintangent
Copy link
Contributor

In preparation for Visual Studio Live Share adding support for "guests" to receive remote language services for Ruby, this PR makes the following changes:

  1. Updates the current DocumentSelector to be limited to file and untitled (unsaved) files.
  2. Prevents the linter from running on workspaces that don't appear to have a root path (which a Live Share/virtual file system wouldn't). The task and intellisense providers already did this, so I made some minor refactorings to gate them all behind the same check.

With these changes, when someone has the Ruby extension installed, and joins a Live Share session (where files use the vsls: scheme), their language services will be entirely derived from the remote/host side, which provides a more accurate and project-wide experience (guests in Live Share don't have local file access to the project they're collaborating with).

If someone joins a Ruby project using Live Share, and doesn't have the Ruby extension installed, then they will automatically receive language services from the host (which is awesome! 🎉), so this PR is simply an optimization for the case where collaborating developers both have the Ruby extension installed. Additionally, this wouldn't impact the "local" Ruby development experience.

Note: As an example, the TypeScript/JavaScript language services that come in-box with VS Code already have this scheme restriction, and so this PR replicates that behavior.

@lostintangent
Copy link
Contributor Author

lostintangent commented Apr 17, 2018

@wingrunr21 The failing tests appear to be related to a debug adapter issue (unrelated to this PR), but that appears to have been resolved in master now.

@wingrunr21
Copy link
Collaborator

Awesome, thanks for this.

@gurgeous FYI on this feature set for your implementation

@wingrunr21 wingrunr21 merged commit 37c2dc4 into rubyide:master Apr 17, 2018
@lostintangent
Copy link
Contributor Author

@wingrunr21 Thanks! Out of curiosity: do you have any plans to update the extension in the marketplace anytime soon?

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

Successfully merging this pull request may close these issues.

2 participants