Microsoft to Revamp C# Extension for Visual Studio Code with LSP Integration
Microsoft is set to make a significant change to the C# extension for Visual Studio Code by transitioning to the Language Server Protocol (LSP). This overhaul will introduce a range of advanced capabilities to the C# extension, including support for proprietary features like IntelliSense and other closed-source functionalities. By adopting LSP, Microsoft aims to enhance the development experience while maintaining compatibility with open-source tools, as both the C# extension and its LSP implementations for C# and Razor will remain open source.
The C# extension has traditionally been powered by OmniSharp, the .NET tools provider, which has relied on available APIs and protocols to support C# development within Visual Studio Code. However, with the rise of LSP as the industry standard for interprocess communication in modern development environments, Microsoft has decided to integrate this protocol to streamline communication and extend the functionality of the C# extension. Tim Heur, Program Manager for .NET and Visual Studio, highlighted the benefits of LSP, including its ability to facilitate smoother integration of new tools and features into existing workflows.
Under the new setup, the C# extension will communicate entirely through LSP, and the OmniSharp component will be updated to support this protocol as well. This shift will unlock new features for the extension, such as closed-source capabilities like IntelliCode, which uses AI to assist developers with code completion and suggestions. These enhancements are expected to significantly improve productivity and provide more intelligent development assistance within Visual Studio Code.
Microsoft also plans to develop an LSP tools host component that will integrate both open-source tools, like the Roslyn compiler and Razor, with closed-source features. This hybrid approach will offer a broader range of tools and capabilities, providing an extensible and flexible environment for C# development. According to Heur, this move aligns with Microsoft’s goal to create a seamless and dynamic tooling environment for C# developers, enhancing the overall experience with Visual Studio Code and facilitating the integration of new features in the future