Add out-of-scope Blazor Component completions with auto-insert @using statements#12336
Add out-of-scope Blazor Component completions with auto-insert @using statements#12336davidwengier merged 13 commits intomainfrom
Conversation
Co-authored-by: davidwengier <754264+davidwengier@users.noreply.github.com>
Co-authored-by: davidwengier <754264+davidwengier@users.noreply.github.com>
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Completion/ElementCompletionResult.cs
Outdated
Show resolved
Hide resolved
...c/Microsoft.CodeAnalysis.Razor.Workspaces/Completion/TagHelperElementWithUsingDescription.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Completion/RemoteCompletionService.cs
Outdated
Show resolved
Hide resolved
...isualStudioCode.RazorExtension.Test/Endpoints/Shared/CohostDocumentCompletionEndpointTest.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: davidwengier <754264+davidwengier@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
...isualStudioCode.RazorExtension.Test/Endpoints/Shared/CohostDocumentCompletionEndpointTest.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: davidwengier <754264+davidwengier@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
...isualStudioCode.RazorExtension.Test/Endpoints/Shared/CohostDocumentCompletionEndpointTest.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Completion/RazorCompletionItemKind.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Completion/RemoteCompletionService.cs
Outdated
Show resolved
Hide resolved
…mplify test Co-authored-by: davidwengier <754264+davidwengier@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Completion/RazorCompletionItem.cs
Outdated
Show resolved
Hide resolved
…e during completion list creation Co-authored-by: davidwengier <754264+davidwengier@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Completion/TagHelperCompletionProvider.cs
Outdated
Show resolved
Hide resolved
…ve AutoInsertNamespace property Co-authored-by: davidwengier <754264+davidwengier@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|

Plan: Add out-of-scope Blazor Component completions with auto-insert usings
Implementation Summary
Final clean implementation:
CodeDocumentparameter so providers have access to the documentAdditionalTextEditsproperty (no intermediate AutoInsertNamespace)Architecture Benefits
This is the cleanest approach:
Original prompt
Fixes #4634
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.