News

Visual Studio IDE Opens Up to More Programming Languages

Visual Studio developers who want to program in non-native languages can now write their own extensions to do so with new support (in preview) for the Language Server Protocol.

The Language Server Protocol (LSP) is an open source project from Microsoft that provides server-based "language smartness" to client tools such as the VS IDE. That smartness includes functionality such as source code auto-completion, Go To Definition, Find All References and so on.

The protocol lets developers enjoy some of the same functionality that comes baked in to the IDE for natively supported languages such as C#, C++, F#, Visual Basic, JavaScript and TypeScript. To do that, developers can create their own LSP-based extensions for the language of their choice using that language's server (if one is available).

Microsoft summarized the new LSP client tool -- which comes as an extension itself -- thusly:

The Language Server Protocol (LSP) is a common protocol that provides language service features to developer tools. A language server contains the deep understanding of a specific language while the Language Server Protocol provides the communication between the language server and the developer tool. The complex logic of a language server needs to be implemented only once and then from there, smaller pieces of code can be written to allow the language server to talk to the specific developer tool. This allows for a consistent editing experience for any tool that supports the protocol.

One such tool that already supports the protocol is Visual Studio Code, Microsoft's open source, cross-platform code editor. As a popular (more than 1 million downloads) example of what that support enables, Red Hat has authored an LSP-enabled extension to provide Java support in VS Code, aptly titled "Language Support for Java by Red Hat," available in the Visual Studio Code marketplace. The tool uses the Eclipse JDT Language Server implementation of the LSP.

Now, the ability to create the same kinds of extensions for their favorite languages in the full-fledged IDE has excited some developers, as evidenced by a Reddit thread discussing building an extension to provide support for the Rust programming language in Visual Studio.

How the Language Server Protocol Works
[Click on image for larger view.] How the Language Server Protocol Works (source: Microsoft).

And there was already widespread excitement for the LSP even before the new client tool was announced, as evidenced by last month's article on the Kichwa Coders ("Eclipse Experts for Embedded Tools Solutions") site titled "The Language Server Protocol Will Revolutionize How You Code."

To get in on the excitement and author their own extensions, developers need to install the Visual Studio extension development workload on Visual Studio 2017 Preview.

"For the preview, you will have to declare a dependency on the Language Protocol Client Preview extension," Microsoft said. "This means that any customers who wish to install your language server extension must also have the Language Server Protocol Client preview extension installed first."

The new LSP extension, provided by Microsoft DevLabs, has been installed 120 times as of this writing, receiving no reviews or ratings yet.

The source code for Microsoft's LSP project is available on GitHub, where the project has garnered 2,142 stars, with 38 contributors.

Also available on GitHub is a Language Server Protocol Sample that provides a mock language server using the LSP and a mock language client extension in Visual Studio.

Further guidance is provided in documentation titled "Adding a Language Server Protocol Extension," along with specific client and protocol API documentation.

Microsoft said it hopes to collect developer feedback on the experimental preview, via comments on the LSP extension page or via e-mail at [email protected].

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube