Adding new languages to Visual Studio
Recently I’ve been playing with the Visual Studio 2008 SDK. This SDK supports a lot of functionality, even allowing you to create and distribute independent applications based on the VS2008 IDE (titled “isolated” mode).
One of the primary use cases for the SDK is implementing domain-specific languages. An example of one of these is the class diagram view, which shows a visual representation that is converted to plain code (I personally use this view for documentation purposes only, but it is possible to add elements and relationship to classes using it). However, the use that has my interest is supporting new languages, specifically, Python.
VS2008 supports at least ten different editors (VB, C#, C++, binary, HTML, resource files, XML, XSLT, XSD, XAML) each of which has its own syntax validation and highlighting requirements. Providing this support comes through language services. Depending on installation settings, a variety of project types and languages are available. These come from templates, project nodes and factories. Debugging support is provided for native and managed code by debugging engines.
To fully implement a new language in this context, quite a large amount of work is required. At this stage, I’ve done about half of what I intend, so it’s time to start writing blog entries. This entry will be the contents page with links to each other page, once they are written.
My tentative plan is:
- A basic language service
- Syntax highlighting
- Hierarchical parsing
- Bracket matching
- Deployment
- New projects
- Project properties
- Start the project (without debugging)
- Name completion
- Parameter information
- Start the project (with debugging)
- Breakpoints
As I have only actually completed seven of these (the seven easiest, not the first seven) and this project isn’t my highest priority, there may not be one post per week. If I miss a week, I’ll try and rant about something to fill the space.

One Response to “Adding new languages to Visual Studio”
Zooba's Blog » VSPy #1 – A basic language service - February 7th, 2010
[...] is the first post in a series adding Python support to Visual Studio. See the table of contents for a brief [...]