- If you are a VB.NET dev, you can install this Html5 auto-completion provider VS.NET extension
- If you are a VB.NET contributors, you can add these two files to your Roslyn fork, in the folder
Completion/CompletionProviders
in the projectMicrosoft.CodeAnalysis.VisualBasic.Features
Usage: This completion provider will provide HTML5 auto completion in VB.NET XML Literals. It provide auto completion only inside vbxml tags:
Dim x = <vbxml>
<!βauto completion for HTML 5 is available here -->
</vbxml>
I did this for two reasons:
- not to mess with other xml literals that doesn't deal with html.
- to support Vazor.
You can write <%
and press Ctrl+space
to get this block written for you:
<%= (Function()
Return < />
End Function)( )%>
where you can use conditions or other vb code to return an html node.
And you can write <(
and press Ctrl+space
to get this block written for you:
<%= (Iterator Function()
For Each item In Collection
Yield <p><%= item %></p>
Next
End Function)( ) %>
where you can modify it to iterat through your collection and yiled an thml node based on each item in the collection, like filling a list with elements.
My aim from publishing this Roslyn-dependant source, is to allow contributors to build upon to provide a generic XML literals completion provider, based on the xsd that user supplies in the context as this missing feature was described in the docs