C# Extension for Visual Studio Codeset for LSP Redesign
Microsoft is planning a major C# extension change for its Visual Studio Code editor, a switch to using the Language Server Protocol (LSP) to enable more advanced features, including closed-source experiences like IntelliSense.
The C# extension itself and LSP implementations for C# and Razor will remain open source, Microsoft said.
The C# extension was powered from the start by .NET tool maker OmniSharp, which leveraged available APIs and protocols. In the meantime, LSP has become the standard interprocess communication mechanism for modern development tools, said Microsoft’s Tim Heur, program manager for .NET and Visual Studio, in an announcement this week in OmniSharp’s GitHub repository.
Future plans are for the C# extension to communicate entirely using LSPs while updating the existing OmniSharp component to communicate via LSPs as well. Using LSPs will allow Microsoft to bring new functionality 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 provide a wider range of tools capabilities. “We believe that moving the C# extension to LSP will help us achieve our goal of creating an extensible and flexible tooling environment that 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 system powered by OmniSharp or the new LSP Tools Host to provide access to additional experiences. The LSP tools host will not be open source. Next steps include:
- Updated C# extension for VS Code to communicate with OmniSharp Server via LSP by default.
- Change the C# extension to use the default LSP tools host and allow users to choose a different language server.
- Shipping extension with new defaults bundled with more functionality out of the box.
- Moved the extension from github.com/OmniSharp/omnisharp-vscode to github.com/dotnet/vscode-csharp, where Microsoft will maintain it.
Copyright © 2022 IDG Communications, Inc.