Microsoft plans a major change to the C# extension for its Visual Studio Code editor, a switch to using the Language Server Protocol (LSP) to enable more advanced capabilities including closed-source experiences such as IntelliSense.

The C# extension itself, and the LSP implementations for C# and Razor, will remain open source, Microsoft said.

The C# extension has been powered from the beginning by .NET tools maker OmniSharp, which has leveraged available APIs and protocols. In the meantime, LSP has become the standard interprocess communication mechanism for modern developer tools, said Microsoft’s Tim Heur, program manager for .NET and Visual Studio, in an announcement this week in OmniSharp’s GitHub repo.

Moving forward, plans call for the C# extension to communicate entirely using LSP while updating the existing OmniSharp component to communicate via LSP as well. Utilizing LSP will allow Microsoft to bring new features to the C# extension, including closed-source experiences such as IntelliCode AI-assisted development capabilities.

Microsoft said it will create an LSP tools host component that integrates open source components such as the Roslyn compiler and Razor tools with closed-source components to offer a wider array of tool capabilities. “We believe that moving the C# extension to LSP will help us accomplish our goal of creating an extensible and flexible tooling environment which easily integrates new experiences into C# for VS Code,” Heur said.

Users of the C# extension will be able to choose between the current open source OmniSharp-powered system or the new LSP tools host to provide access to additional experiences. The LSP tools host will not be open-sourced. Next steps include:

  • Updating the C# for VS Code extension to communicate with OmniSharp Server via LSP by default.
  • Switching the C# extension to use the LSP tools host by default and to allow users to choose an alternative language server.
  • Shipping the extension with the new defaults bundled with more features out of the box.
  • Moving the extension from github.com/OmniSharp/omnisharp-vscode to github.com/dotnet/vscode-csharp, where Microsoft will maintain it.

Source