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

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

Merged
merged 1 commit into from
Apr 16, 2018
Merged

Conversation

lostintangent
Copy link
Contributor

In preparation for Visual Studio Live Share adding support for "guests" to receive remote language services for Pascal, this PR simply updates the current DocumentSelector to be limited to file and untitled (unsaved) files. This way, when someone has the Pascal 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).

Outside of the context of Live Share (i.e. doing local Pascal development), this PR is simply a more explicit version of the existing behavior, and would be fully backwards-compatible.

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.

@alefragnani
Copy link
Owner

Hi @lostintangent ,

Thanks for you PR. I will update the extension latter at night 👍

BTW, is there anything else that I should be careful to support Visual Studio Live Share on my other extensions? Do you have any documentation/guidelines about it?

Thanks

@lostintangent
Copy link
Contributor Author

@alefragnani Thanks! It's not as user-friendly as I'd like it to be, but you can check out the following known-issues for VS Code extension authors to look our for: https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/extensions#known-issues. Many of your extensions should already work great (e.g. Copy Word, RTF). However, I've actually been meaning to send a PR for your (awesome!) Bookmarks extension since it doesn't currently work for the guest in a Live Share session.

@alefragnani alefragnani merged commit 6bfdb55 into alefragnani:master Apr 16, 2018
@alefragnani
Copy link
Owner

Wow, I'm flattered 😁

Feel free to send a PR to the Bookmarks extension, I would be grateful. After that, I could use your PR and apply the same fixes to my other Numbered Bookmarks extension, which works very similar.

I'm not sure, but I think my Status Bar Read-Only Indicator also need fixes, because it uses fs.accessSync to check if a file is readonly/writeable (https://github.com/alefragnani/vscode-read-only-indicator/blob/b8f362567aeec0e46aa162acee0c199c2cea51f9/src/extension.ts#L161). Am I right?

Do you have any idea when Live Share will be available (open)? A lot of co-workers uses VS Code (I converted a lot of Sublime users 😄) and Live Share would be a great addition for our daily work.

Thanks

@lostintangent
Copy link
Contributor Author

Ping me at joncart@microsoft.com and I can get you and your co-workers invites right away :)

@alefragnani
Copy link
Owner

I started to play with Live Share support for Bookmarks extension, based on the docs that you provided. I hope to have a playable version soon.

@alefragnani
Copy link
Owner

I sent you an e-mail requesting the invite 😀

@lostintangent
Copy link
Contributor Author

@alefragnani Awesome! Just replied to your mail to get you setup with access. As soon as you have some with the bookmarks extension, I’d love to check it out :D

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

Successfully merging this pull request may close these issues.

None yet

2 participants