VS code use ML to detect programming language, set mode
Visual Studio Code now uses machine learning to detect the programming language used in a pasted file, and then automatically set the correct mode.
This experimental feature, introduced in last month’s regular update, is now enabled by default in the August 2021 update, version 1.6.0.
“We added this functionality because we found that some new VS Code users did not know how to set the language mode and did not know that it was necessary to get the rich feature set of VS Code (language colorization and extension recommendations), ”the development team said in a recent announcement. “Allowing new users to quickly see the features and language extensions available for VS Code helps them get started in the editor. ”
By enabling automatic detection of the default language, the team also extended the detection capabilities to work with files that do not have a file extension. In addition to detecting the programming language used in files copied and pasted into VS Code, the feature also works with transmitted code and in laptops using the language switcher.
“Additionally, power users who use untitled text editors as a notepad no longer need to explicitly set the language mode, which will hopefully streamline their workflow,” Microsoft said. .
Here are links to other things to note in VS Code v.1.60:
- Quick colorization of brackets integrated – Fast bracket matching and colorization for large files: the editor now supports native colorization of bracket pairs, which can be enabled by setting
"editor.bracketPairColorization.enabled": true. All colors are thematic and up to six colors can be configured.
- Highlighting Parameter Editor Syntax – Rich syntax highlighting for configuration description code blocks: Closed code blocks in configuration descriptions are now syntax highlighted
- Custom terminal glyph rendering – Better display of box and block element drawing characters: Box and block element drawing characters now use custom pixel-perfect glyphs instead of using the font when GPU acceleration is enabled (
terminal.integrated.gpuAcceleration). Thus, the boxes are drawn without spaces, even if the height of the lines or the spacing of the letters is defined in the terminal.
- Set debug monitoring values – Edit monitored values during a debugging session: developers can now set the value of a monitored expression in the WATCH view using the Set the value action from the context menu.
- Notepad improvements – Markdown link navigation, faster rendering of large outputs: Notebooks now support links between Markdown cells.
- Preview Locked Editor Group – Keep a preferred editor layout by locking out the editor group: With the introduction of terminals in the edit box, the team heard from frustrated users that a terminal editor could be replaced too easily or by accident by a file editor. Now, by default, files will always open in the active editor group, so even when a terminal was active, a file would open and hide the terminal.
- Updates to Python Extension Tests – Better support for test discovery, navigation and status: “With the new test API, the Python extension has revamped its testing functionality. Now you can enjoy a more stable experience for test discovery, navigation and status rendering, as well as new features such as finding tests, running a selection of tests, rerunning the last one. test run, and more! “
- A Guide for Web Extensions Authors – Learn how to update your extension for VS Code in the browser: A guide to building web extensions helps developers know what types of extensions work best on the web, how to access VS Code APIs, and work with them. virtual file systems.
The announcement post also details many other new features and functionality, as well as some notable fixes.
David Ramel is editor and writer for Converge360.