Handle Razor text views without adapters - #85863
Open
davidwengier wants to merge 1 commit into
Open
davidwengier wants to merge 1 commit into
davidwengier wants to merge 1 commit into
Conversation
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix follows established adapter patterns and has comprehensive regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Handles Razor multi-view diff text views when native VS adapters are unavailable.
Changes:
- Makes buffer and view adapters optional.
- Continues managed editor setup without a view adapter.
- Adds exhaustive adapter/scenario tests.
| File | Description |
|---|---|
RazorLSPTextViewConnectionListener.cs |
Safely handles missing adapters. |
RazorLSPTextViewConnectionListenerTest.cs |
Tests all adapter, client, and buffer combinations. |
kayle
approved these changes
Oct 1, 2026
kayle
reviewed
Oct 1, 2026
| // ** Content Type Mappings ** | ||
| // RazorCSharp = .NET Framework Razor editor | ||
| // RazorCoreCSharp = .NET Core Legacy Razor editor | ||
| // Razor = .NET Core Razor editor (LSP / new) |
Contributor
There was a problem hiding this comment.
is there any plan to unify these all on the new LSP model? Let me know if there's anything we can do on the editor side to simplify it
Member
Author
There was a problem hiding this comment.
RazorCoreCSharp can probably be deleted, it should be never used and cohosting was effectively unifying it onto the LSP editor. I've made a note for myself. RazorCSharp (the .NET Framework editor) is not going anywhere, doesn't get worked on, isn't owned by our team.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our code was assuming a text view adapter would always be present, but that isn't true for the multi-view diff experience in VS.
Microsoft Reviewers: Open in CodeFlow