Skip to content

Edit Commands for VS Code plugin#6129

Merged
aryairani merged 18 commits intotrunkfrom
lsp/edit-command
Jan 22, 2026
Merged

Edit Commands for VS Code plugin#6129
aryairani merged 18 commits intotrunkfrom
lsp/edit-command

Conversation

@ChrisPenner
Copy link
Member

@ChrisPenner ChrisPenner commented Jan 20, 2026

Overview

Adds custom LSP handlers for unison/editDefinition and unison/projectContext;
these will be used by the VS Code plugin (and possibly other LSP plugin implementations) tell UCM to add a definition to the specified file; and to fetch the currently connected LSP's project context respectively.

Implementation approach and notes

  • Add the two new endpoints
  • Make some tweaks to the underlying Edit Definition code to support non-ucm edit destinations.

Test coverage

Tested Manually

edit2.mp4

Loose ends

  • We should publish a notification to the LSP clients when the project context changes so they can update too.
  • We should properly jump to the definition in question if it's already in the file (there's currently a race condition here, since the actual edit to the file is performed separately from the request, but we can figure it out)
  • Would be nice to have a search filter in the codebase panel, currently not feasible because UCM doesn't support it and namespaces are fetched on-demand
  • Some way to switch projects from VS Code

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

Some tests with 'continue-on-error: true' have failed:

@ChrisPenner ChrisPenner force-pushed the lsp/edit-command branch 2 times, most recently from c5da3fa to eb0dc94 Compare January 21, 2026 19:11
Copy link
Member Author

Choose a reason for hiding this comment

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

Refactored this module to allow the LSP to call bits of it without requiring the Cli monad.

@ChrisPenner ChrisPenner changed the base branch from trunk to topic/bfs-before January 22, 2026 00:32
@ChrisPenner ChrisPenner changed the base branch from topic/bfs-before to trunk January 22, 2026 00:32
@ChrisPenner ChrisPenner requested a review from aryairani January 22, 2026 01:29
@ChrisPenner ChrisPenner marked this pull request as ready for review January 22, 2026 17:55
@aryairani aryairani merged commit fb9392e into trunk Jan 22, 2026
32 checks passed
@aryairani aryairani deleted the lsp/edit-command branch January 22, 2026 17:56
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