Add documentation completion and snippets - #85727
Open
davidwengier wants to merge 2 commits into
Open
davidwengier wants to merge 2 commits into
davidwengier wants to merge 2 commits into
Conversation
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
davidwengier
changed the base branch from
davidwengier/razor-doc-folding
to
davidwengier/razor-doc-formatting
September 21, 2026 11:34
davidwengier
added this pull request to stack #85729
September 21, 2026 12:46
akhera99
approved these changes
Sep 21, 2026
dibarbet
approved these changes
Sep 21, 2026
davidwengier
force-pushed
the
davidwengier/razor-doc-completion
branch
from
September 28, 2026 22:21
e7106aa to
9aee211
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Documentation completion is incorrectly offered in import files where the directive is diagnosed and discarded.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds Razor 12 documentation completion and XML/cref completion coverage across Visual Studio and VS Code.
Changes:
- Adds a multiline
<summary>snippet. - Tests version gating, completion edits, and both hosts.
- Documents the completion behavior.
| File | Description |
|---|---|
DirectiveCompletionItemProvider.cs |
Adds the documentation snippet. |
DirectiveCompletionItemProviderTest.cs |
Tests provider output. |
DirectiveVerifier.cs |
Updates renamed snippet references. |
CohostDocumentCompletionEndpointTest.cs |
Tests host completion scenarios. |
documentation-directive.md |
Documents completion support. |
davidwengier
force-pushed
the
davidwengier/razor-doc-completion
branch
from
September 30, 2026 00:02
9aee211 to
ee59b02
Compare
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: None
Resolved since last review (1)
Copilot stopped reviewing on behalf of
davidwengier due to an error
September 30, 2026 00:23
davidwengier
removed this pull request from stack #85729
October 4, 2026 21:37
Make the new directive discoverable and offer a valid XML summary block from the start. Reuse directive completion and broaden the snippet collection name to match its contents.
Completion needs to respect Razor versions and carry XML and cref edits back to the Razor file. Cover the keyword, snippet and mapped C# completion paths rather than adding a separate XML completion engine.
davidwengier
force-pushed
the
davidwengier/razor-doc-completion
branch
from
October 5, 2026 01:17
ee59b02 to
975b0ed
Compare
davidwengier
added this pull request to stack #85913
October 5, 2026 01:20
Member
Author
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.

Adds
documentationcompletion and a multiline<summary>snippet in Visual Studio and VS Code for Razor 12 and later. XML element andcrefcompletion use the existing C# completion path, including mapping edits back to the Razor file.Based on #85726 (
davidwengier/razor-doc-formatting). Part of #85414.The first commit contains the provider change, snippet docs and the existing test-reference renames needed to keep it building independently. The second is tests-only. Formatting support comes from the parent; this PR doesn't add a separate XML completion engine or change the reviewed assertions.
Validation used VSTest/xUnit v2 with
--no-restore -p:RunAnalyzersDuringBuild=true -p:GenerateBaselines=false:DirectiveCompletionItemProviderTest, net10.0CohostDocumentCompletionEndpointTest, net10.0CohostDocumentCompletionEndpointTest, net472No skipped tests. All new scenarios ran, including both file-kind variants of the XML completion-edit test in both hosts. Touched-file formatting, whitespace and frozen-source/encoding checks passed.
Microsoft Reviewers: Open in CodeFlow