Skip to content

Conversation

@ChrisPenner
Copy link
Member

@ChrisPenner ChrisPenner commented Jan 10, 2026

Overview

@pchiusano mentioned that it would be nice to a quick way to open a given definition on Share.

This adds the Unison API which allows us to add a VS Code context menu option to do exactly that;

VS Code PR here.
This PR (the unison one) must be merged first.

on-share.mp4

Implementation approach and notes

  • VS Code sends the LSP a request, including the file URI and location of the cursor
  • We resolve that file location to the relevant symbol (note that if the file isn't parsing this may not succeed)
  • We look up the remote mapping for the current project/branch.
  • We build a link against that remote project & branch using the FQN of the relevant symbol.
  • Note that if the remote and local states differ, that FQN may not exist on Share, at which point Share just shows a "couldn't find it" message.

Test coverage

  • Manual testing

@ChrisPenner ChrisPenner changed the title Open on share vs code plugin api endpoint Open on share VS-Code plugin api endpoint Jan 10, 2026
@ChrisPenner ChrisPenner marked this pull request as ready for review January 10, 2026 00:48
@ChrisPenner ChrisPenner requested a review from aryairani January 10, 2026 07:54
Copy link
Member

@pchiusano pchiusano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

@pchiusano pchiusano merged commit f88547d into trunk Jan 11, 2026
32 checks passed
@pchiusano pchiusano deleted the cp/open-on-share branch January 11, 2026 22:18
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.

2 participants