Coder Social home page Coder Social logo

xml-literals-completion-provider's Introduction

Setup:

  • 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 project Microsoft.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:

  1. not to mess with other xml literals that doesn't deal with html.
  2. 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.

Note:

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

xml-literals-completion-provider's People

Contributors

vbandcs avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

playfloor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.