Microsoft’s latest update to the Copilot extension for Visual Studio brings a groundbreaking feature—variable naming suggestions. Dalia Abo Sheasha, in an announcement on the Visual Studio Developer Blog, highlights the innovation:
Intelligent Naming Assistance
The enhanced Copilot not only suggests names but employs artificial intelligence to scrutinize identifier usage and coding style. This results in suggestions that seamlessly integrate into your codebase, akin to having a coding companion who enhances your code without overwhelming you.
Enhancing Code Readability and Maintainability
Microsoft’s goal is to improve code readability and maintainability, ensuring longevity and comprehensibility for years to come. The tool utilizes AI to analyze current identifier usage and recommends expressive names, promoting better coding practices.
Simple Integration and Usage
To leverage this feature, users can simply highlight a variable name, right-click, and select Rename. The tool then presents a curated list of renaming suggestions based on the contextual understanding of your code, notes NIX Solutions.
To experience this feature, an active GitHub Copilot subscription is required. Users can update the GitHub Copilot Chat Extension and enable the rename feature in GitHub options under Copilot Chat – “Enable rename suggestions.”