Skip to content

Add documentation completion and snippets - #85727

Open
davidwengier wants to merge 2 commits into
davidwengier/razor-doc-formattingfrom
davidwengier/razor-doc-completion
Open

davidwengier wants to merge 2 commits into
davidwengier/razor-doc-formattingfrom
davidwengier/razor-doc-completion

Conversation

@davidwengier

@davidwengier davidwengier commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Adds documentation completion and a multiline <summary> snippet in Visual Studio and VS Code for Razor 12 and later. XML element and cref completion 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:

Check Result
Product-only Remote net10.0 build with analysers Passed, no warnings or errors
Full Remote DirectiveCompletionItemProviderTest, net10.0 32/32 passed
Full VS Code CohostDocumentCompletionEndpointTest, net10.0 88/88 passed
Full VS CohostDocumentCompletionEndpointTest, net472 112/112 passed

No 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

@davidwengier
davidwengier requested a review from a team as a code owner September 21, 2026 11:32
@azure-pipelines

Copy link
Copy Markdown
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
davidwengier changed the base branch from davidwengier/razor-doc-folding to davidwengier/razor-doc-formatting September 21, 2026 11:34
@davidwengier
davidwengier requested a review from a team September 21, 2026 11:50
@davidwengier
davidwengier added this pull request to stack #85729 September 21, 2026 12:46
Copilot AI balanced review requested due to automatic review settings September 28, 2026 22:21
@davidwengier
davidwengier force-pushed the davidwengier/razor-doc-completion branch from e7106aa to 9aee211 Compare September 28, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Medium severity

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.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 00:02
@davidwengier
davidwengier force-pushed the davidwengier/razor-doc-completion branch from 9aee211 to ee59b02 Compare September 30, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
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
davidwengier force-pushed the davidwengier/razor-doc-completion branch from ee59b02 to 975b0ed Compare October 5, 2026 01:17
@davidwengier
davidwengier added this pull request to stack #85913 October 5, 2026 01:20
@davidwengier

Copy link
Copy Markdown
Member Author

@dibarbet @akhera99 for re-review after rebase

This branch has not been deployed

No deployments
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.

4 participants