October 2020 (version 1.51)

Contributions to extensions

GitHub Pull Requests and Issues

Work continues on the GitHub Pull Requests and Issues extension, which allows you to work on, create, and manage pull requests and issues.

To learn about all the new features and updates, you can see the full release of the extension.

Remote Development

Work continues on the Remote Development extensions, which allow you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment.

Feature highlights in 1.50 include:

  • Improved log access and rendering for containers.
  • Better recovery support for cloning repositories in container volumes.
  • Ability to install an extension in a remote context (container, SSH, WSL) without having to reload VS Code.

You can learn about new extension features and bug fixes in the Remote Development release notes.

ESLint

The approval flow to allow the execution of a ESLint library got reworked. The initial experience is now as follows:

  • No modal dialog is shown when the ESLint extension tries to load a ESLint library for the first time and an approval is necessary. Instead, the ESLint status bar item changes to indicating that the execution is currently blocked.
  • If the active text editor content can be validated using ESLint, a problem at the top of the file is shown in addition.

The execution of the ESLint library can be denied or approved using the following gestures:

  • Clicking on the Status Bar icon.
  • Using the quick fix for the corresponding ESLint problem.
  • Executing the command ESLint: Manage Library Execution from the command palette.

All gestures will open the following dialog:

The chosen action is then reflected in the ESLint Status Bar item in the following way:

  • will prefix the status bar item with a check mark.
  • will prefix the status bar item with a double check mark.
  • and will prefix the status bar item with a blocked sign.

You can manage our decisions using the following commands:

  • ESLint: Manage Library Execution will reopen above dialog.
  • ESLint: Reset Library Decisions lets you reset previous decisions you have made.

Template string converter

The Template String Converter extension converts quotes to backticks when a and are entered within a string in JavaScript and TypeScript files.

Docs View

The Docs View extension uses the new to show documentation for the symbol at the current cursor position in the sidebar or panel:

Editing

Code Navigation

Java in Visual Studio Code also supports source code navigation features such as search for symbol, Peek Definition, and Go to Definition. The Spring Boot Tools extension provides enhanced navigation and code completion support for Spring Boot projects.

One of the key advantages of VS Code is speed. When you open your Java source file or folder, within a few seconds, with the help of , you will be able to navigate your code base with the Outline view, as well as commands such as Go to Definition and Go to Reference. This is especially useful when you open a project for the first time.

Code Completion

IntelliSense is a general term for language features, including intelligent code completion (in-context method and variable suggestions) across all your files and for both built-in and third-party modules. VS Code supports code completion and IntelliSense for Java through Language Support for Java(TM) by Red Hat. It also provides AI-assisted IntelliSense called IntelliCode by putting what you’re most likely to use at the top of your completion list.

For more details, see Java Code Navigation and Editing. VS Code also supports a range of Refactoring and Linting features.

Getting started

NOTE: If you are using VS Code on Windows and want to take advantage of the Windows Subsystem for Linux, see Developing in WSL.

Before you start, you must have the Java SE Development Kit (JDK) on your local environment. To run the VS Code for Java extension, Java SE 11 or above version is required; for projects, VS Code for Java supports projects with version 1.5 or above. For how to configure, refer to .

For developers new to Java or new to VS Code, we provide a Getting Started experience. Once you’ve installed the Extension Pack for Java, you can open the Getting Started experience from within VS Code with the Java: Getting Started command from the Command Palette. Open the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) and type «Java: Getting Started».

Extension authoring

vscode.env.uiKind

A new API was added so that an extension can know in which kind of UI is it running. To support running VS Code in a browser, the possible values are and .

Call Hierarchy Provider API

We have finalized the call hierarchy provider API: . It supports the Peek Call Hierarchy feature, which finds callers to and calls from functions, methods, etc.

Task CustomExecution

The task type API has been finalized. If a shell or process task isn’t suitable for your task, you can use a task to execute a callback in your extension. Learn more in the .

Debug API: «consoleMode» option for «startDebugging» request

In the last milestone, we had introduced a
for controlling whether a hierarchy of debug sessions shares a single Debug Console or use individual consoles. This API is now official so you can use it in extensions published on the Marketplace.

Icon color tokens

We’re excited to finally introduce new color tokens for our icons. We’re slowly adding these for certain areas, below is the first batch.

Symbols

These icons appear in the Outline view, breadcrumb navigation, and suggest widget.

Problems and Notifications

We’ve set the default colors for the problems and notifications icons to inherit from the editor foreground colors, so if you change those colors, it will inherit to the other areas:

You can also explicitly set the icon colors for the Problems panel and Notifications:

Lightbulb

The lightbulb icons are also themable:

vscode.env.asExternalUri

The API allows an extension to resolve an external URI — such as a or URI — from where the extension is running to a URI for the same resource on the client machine. This is a companion to the API, except instead of opening the resolved URI using an external program, it returns the result to extensions.

For and URIs, is a no-op if the extension is running on the client machine. However, if the extension is running remotely, automatically establishes a port forwarding tunnel from the local machine to on the remote and returns a local URI to the tunnel.

If is called with a URI, then it returns a URI that — if opened in a browser (for example via ) — will result in the registered URI handler being triggered.

Removal of experimental Custom Data settings and Contribution Points

settings and Contribution Points were and now removed. You can use the stable Custom Data settings and Contribution Points instead. To read more about the Custom Data Format, see the microsoft/vscode-custom-data repository.

extensionKind can be an array

In , the property could have the value or to indicate where an extension should run in the remote case. With this release, can now be an array. For example, would indicate that an extension can run both on the and side, with a preference to running on the side, if installed there.

Настройки¶

См.также

Настройки хранятся в формате JSON и доступны из меню
.

Шрифт

Шрифт задается в настройках :

// Place your settings in this file to overwrite the default settings
{
    // Controls the font size.
    "editor.fontSize": 16
}

Автодополнение через <Tab>

Более привычно дополнять код по клавише <Tab>. Для этого необходимо
открыть настройки пользователя и прописать
опцию :

// Place your settings in this file to overwrite the default settings
{
    // Controls the font size.
    "editor.fontSize": 16,
    // Insert snippets when their prefix matches. Works best when 'quickSuggestions' aren't enabled.
    "editor.tabCompletion": true
}

Язык

См.также

  1. Открываем командную строку Ctrl + Shift + P

  2. Вводим команду Configure Language

  3. Меняем локаль на нужную, например :

    {
        // Defines VS Code's display language.
        "locale": "ru"
    }

Editor

Go to Definition improvements

We have polished the Go to Definition action and its friends, Go to Declaration, Go to Type Definition, and Go to Implementation.

Earlier, we added the editor.gotoLocation.multiple: goto option to disable showing a Peek view when a symbol has multiple definitions. However, it would only show the first definition and ignore the rest. This is now much better, as multiple results are shown in the Status bar and pressing F12 jumps to each definition.

  • Go to Definition now honors the setting. This means that an editor that is already open in another group can be reused (or not) when going to a symbol. Note that the old, hard-coded behavior was to reuse the current editor and the default for is not to reuse.
  • The Peek view now supports search and filter, like the results tree, to allow you to quickly narrow down on a result.
  • Last but not least, you can now cancel long running requests for definitions by pressing Escape.

Breadcrumbs displayed

Breadcrumbs for quick file and symbol navigation are now on by default. This can be toggled in the View menu View > Show Breadcrumbs command.

Contributions to extensions

Brackets

Developers coming from the Brackets source code editor can keep using their same keyboard shortcuts in VS Code with the Brackets Keymap extension. There is also a Brackets Extension Pack, which bundles extensions for working with CSS and creating live previews.

GitHub Pull Requests and Issues

Work continues on the GitHub Pull Requests and Issues extension, which allows you to work on, create, and manage pull requests and issues.

To learn about all the new features and updates, you can see the full release of the extension.

Remote Development

Work continues on the Remote Development extensions, which allow you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment.

Feature highlights in 1.54 include:

  • Ports view table layout
  • Remote — SSH: X11 Forwarding
  • Remote — WSL: Improved WSL 2 support

You can learn about new extension features and bug fixes in the Remote Development release notes.

October Release Summary

Welcome to the October release of Visual Studio Code. There are a number of significant updates in this version that we hope you will like, some of the key highlights include:

  • — Organize your editors in either vertical or horizontal groups.
  • — New printable keyboard shortcuts PDF cheat sheet.
  • — Get rich auto completions for CSS embedded in your HTML.
  • — Set breakpoint hit count conditions.
  • — Easily configure your Node.js debugging sessions.
  • — You can now use these well-known keyboard shortcuts in VS Code.
  • — Quickly disable an Extension globally or for a specific workspace.
  • — The Dark+ themes now colorize variable and function references.
  • — View dependencies of an extension pack right in the extension details.

The release notes are arranged in the following sections related to VS Code focus areas. Here are some further updates:

  • — Some View states now persisted in user settings. Open multiple files from Quick Open.
  • — Keyboard shortcuts reference, finer formatting control.
  • — JavaScript and CSS improvements.
  • — New categories for Keymaps and Formatters for easier search.
  • — Multi-target debugging support, new debugging settings.
  • — Support for extension CHANGELOG.md files. Add to the editor tab context menu.

Spring Boot, Tomcat, and Jetty

To further improve your Java productivity in VS Code, there are extensions for most popular frameworks and tools, such as Spring Boot, Tomcat, and Jetty, created by the community.

The Tomcat extension includes an explorer to easily navigate and manage your Tomcat servers. You can create, start, debug, stop, and rename Tomcat servers with the extension.

See Application Servers to learn more about support for Tomcat and Jetty, as well as other application servers with VS Code.

Spring Boot support is provided by Pivotal. There are also the Spring Initializr Java Support and Spring Boot Dashboard extensions provided by Microsoft, to further improve your experience with Spring Boot in Visual Studio Code.

See Spring Boot with VS Code to learn more about Spring Boot support in VS Code, and also Deploy to Azure Web Apps or Deploy to Azure Spring Cloud to learn more about deploying Spring apps to Azure from VS Code.

Preview features

Search in open editors

This release comes with experimental support for searching in open editors, which has been a highly requested feature for some time. This feature is enabled by default in Insiders, and can be enabled with the setting in Stable.

Theme: GitHub Light Theme

TypeScript 4.2 support

This release continues to improve our support for the upcoming TypeScript 4.2 release. You can read more about the new language features and improvements in TypeScript 4.2 on the TypeScript blog. Here are some of the editor improvements it enables:

  • JS Doc templates now generate .
  • Deprecated DOM APIs are now marked as such.
  • A quick fix to declare missing functions.
  • Native support for semantic highlighting, instead of using a TypeScript service plugin.

To start using the TypeScript 4.2 nightly builds, just install the TypeScript Nightly extension. Please share your feedback and let us know if you run into any bugs with TypeScript 4.2.

New Find References to File command

If you are using TypeScript 4.2, you can also try the new Find References to File command for JavaScript and TypeScript to find all places where a file is being referenced.

You can trigger this command in a few different ways:

  • For the active file using TypeScript: Find File References command.
  • Right-click on an editor tab and select Find File References.
  • Right-click on a file in the File Explorer and select Find File References.

IntelliSense

Resizable suggestions

This milestone, we’ve made several improvements to the suggestions UI. First and foremost, it can now be resized. Drag the sides or corners to resize the control.

Theme: GitHub Light, Font: FiraCode

The size of the suggestions list will be saved and restored across sessions. The size of the details pane is only saved per session, since that size tends to be more variable. Also, the setting has become obsolete.

Status bar for suggestions

The suggestions control can now also show its own status bar at the bottom of the window. Enable it using the setting. It makes toggling details simpler, and shows if a completion supports inserting, replacing, or both.

Theme: GitHub Light, Font: FiraCode

In the sample above, selecting «Insert» results in and selecting «Replace» results in .

The new setting allows you to configure whether you prefer insert or replace. When a suggestion supports both, your preference will be the default.

Move cursor to select suggestions

Last but not least, you can now move the cursor while suggestions are showing. For instance, you can trigger suggestions at the end of a word, move left to see more suggestions, and then use replace to overwrite the word.

Theme: GitHub Light

Documentation and extensions

Python

There are two new Python tutorials:

  • Python in a container — Learn how to build a Python application in a Docker container.
  • Python for Data Science — Use Python data science libraries to create a machine learning model.

Docker extension

The 1.0 version of the Microsoft Docker extension is now available. The extension can add Docker files to your project, build and debug Docker images, and includes an Explorer to easily start, stop, inspect, and remove containers and images.

Azure extensions

There are two new extensions for working with Azure assets directly from within VS Code.

  • Azure Virtual Machines — Create Ubuntu Virtual Machines with pre-configured SSH access so you can connect to them using the Remote-SSH extension.

  • Azure Resource Groups — View all of your Azure Resources and quickly navigate to them in the Azure View.

Debugging

Start the same debug configuration multiple times

We have removed the restriction that only a single debug session can be started from a launch configuration. You can now start multiple concurrent sessions by pressing the green run button in the debug configuration dropdown menu any number of times.

Each subsequent debug session will have a number appended at the end of the name so they can be easily distinguished.

Breakpoints: condition editing

We’ve continued the effort to consolidate and simplify breakpoint editing from the BREAKPOINTS view:

  • Condition and hit count editing support has been added for function breakpoints. With this condition editing is now available for source-, function-, and exception breakpoints and logpoints.
  • You can initiate condition editing from the context menu, or the new inline Edit Condition action.

An example of condition editing in the BREAKPOINTS view:

Note that while the new UI supports editing of all breakpoint types, conditions, and hit counts are only respected if a debug extension actually supports them. Currently, we are not aware of any debuggers supporting conditions and hit counts for function breakpoints, but we expect some support soon. For exception breakpoints, condition support has been added to the built-in JavaScript debugger in this release.

Prompt to save untitled files before run/debug

A common issue reported by new users who are just getting into programming is forgetting to save files before running them. Since most debuggers cannot debug untitled files (PowerShell being an exception), we now prompt users to save open untitled files in the active editor group before running or debugging.

Syntax coloring for breakpoint zone widget

The breakpoint editor zone widget now supports syntax coloring by respecting the language mode of the underlying editor.

Debug console action moved into secondary menu

In order to make more room for the debug dropdown menu in the debug view, we have moved the Debug Console action to the secondary menu ().

In addition, we believe that the need for the action is small given that the debug console opens automatically when a debug session starts.

Improved logging for extension debugging

When debugging an extension, calls to APIs are now processed through the built-in JavaScript debugger, which allows for richer representation of complex objects like source mapped stacktraces.

JavaScript debugger

A complete list of changes can be found in the vscode-js-debug changelog.

Conditional exception breakpoints

are now supported in the JavaScript debugger. The variable will contain the currently thrown exception:

Theme: Codesong

Debug worker_threads

Debugging of Node.js is now supported.

Theme: Codesong

No changes or extra configuration is needed.

Extension Authoring

Breaking Change: semantics

API related implementations which return have changed semantics. Each will be visually separated from the others with a horizontal line. Both the and APIs are affected by this.

Changelogs

You can now display your extension’s CHANGELOG.md directly in the extension details view.

We recommend extension authors move any existing changelogs from their extension’s README.md to a separate CHANGELOG.md file. Similar to README.md, if the CHANGELOG.md is placed in the extension’s workspace root, it will be automatically included by the publishing tool.

Provide menu entries for the editor tab context menu

We added an additional place where extensions can contribute menu entries, the context menu of an editor tab (this also works when tabs are disabled). The related menu path for contributing here is .

For example:

Update Now: Using latest vscode.d.ts

As ever, the latest and greatest version of our extension API is defined in the vscode.d.ts file.

Please read to learn how to migrate your existing extensions to the latest vscode module.

Workbench

Workspace Trust

The Workspace Trust feature was a big change that came in the and we believe it is important that developers can safely browse code, even when they are unfamiliar with the source. This milestone we’ve been absorbing customer feedback and have focused on fixing issues and following up on suggestions.

In order to help people discover the user settings that can , there is a new Configure your settings action in the header of the Workspace Trust editor. This action will bring up the Settings editor filtered by .

Speaking of settings, there is a new setting to configure when the banner appears indicating that the current window is in Restricted Mode. Similar to the setting, the new allows you to disable the banner after you’ve become familiar with the Workspace Trust feature and don’t need a reminder that you are working in Restricted Mode. By default, this banner shows once per workspace and remains until it is dismissed (). The other options for displaying the Restricted Mode banner are and .

You can learn more about the rationale and development of Workspace Trust in the recent Workspace Trust blog post. The post explains how Restricted Mode helps protect you from unintended, and potentially malicious, code execution and has tips to set up your development machines so you can work both quickly and safely.

Settings editor

This iteration adds support to the Settings editor for settings objects with a fixed number of Boolean properties, by rendering the properties as a list of checkboxes.

This iteration also adds additional support for arrays of enumerations, by using dropdowns in editing mode instead of plain textboxes.

Transient workspaces

There is now a new flavor of workspace, called a «transient» workspace, that behaves differently than usual workspaces, specifically:

  • Restarting or reloading VS Code will not attempt to open the workspace again.
  • Workspaces set as transient do not show up in the list of recently opened workspaces.

Designate a transient workspace by adding the property set to in the workspace file:

Settings Sync

There is now a Troubleshoot view for Settings Sync that contains all logs and the last sync states. You can access this view by running the command Settings Sync: Show Synced Data and enabling it by opening the Views submenu and checking Troubleshoot:

Theme: GitHub Light Theme

Search max results setting

There is a new setting, , which lets you set the maximum number of text search results. The default is 20,000, up from 10,000 previously. You may see some slowness when loading a very large number of search results.

Thank You

Last but certainly not least, a big Thank You! to the following folks that helped to make VS Code even better:

Contributions to :

  • Gordon Mckeown(@gmckeown): Improved rendering of Seti icons #22667
  • @admosity: Fix typo in inspectKeybindings.ts PR #25262
  • Brian Schlenker (@bschlenk): Add noValuePreselect option to showInputBox PR #23827
  • Burak Can (@burakcan): Suggestion widget: Fix overflowing text problem (fixes #20679) PR #20857
  • Christopher Leidigh (@cleidigh)

    • Scm css fix for keyboard navigation and actions Issue PR #23967
    • Monokai UI theme — first pass for #25327 PR #25599
  • Dick van den Brink (@DickvdBrink): Fixed typo in terminal.contribution description PR #23784
  • David Hewson (@dten): OK capitalisation fix PR #25005
  • Eric Amodio (@eamodio): Adds editor options overloads to showTextDocument & vscode.diff PR #23641
  • Elias Winberg (@elias-winberg): Remove class snippet comment PR #23209
  • William Esz (@flagello)

    • Escape paths in npm.sh to fix #20907 PR #21010
    • Escape paths in code.sh PR #21016
  • @gauss1314: Update typescriptMain.ts PR #24892
  • Vakhurin Sergey (@igelbox): Added support for encodings for Git. PR #24911
  • Ilie Halip (@ihalip): Small comment fix PR #25558
  • Yuki Ueda (@Ikuyadeu): fix Solarized Light theme highlighting #24040 PR #24292
  • Jordan Menard (@jordanmkasla2009)

    • Open vscode://file/path/to/project/ URLs properly on Windows — fixes #20290 PR #20469
    • Implement #12910 PR #20881
  • Jakub Synowiec (@jsynowiec): Add an option to enable/disable JSDoc autocomplete PR #23704
  • Dominic Valenciana (@Kiricon)

    • Added missing . to hc-black so that it displays the correct scm actio… PR #24385
    • Changed git renamed icon to orange color PR #24567
    • Nested code lines now no longer display the hover border left. PR #24686
  • Phawin Khongkhasawan (@lifez): Add zenMode.hideActivityBar option PR #24499
  • Magnus Hiie (@magnushiie): Expose insert..Braces rule in VS Code settings PR #21649
  • Marek Lewandowski (@mlewand): Added support for home/end key in IntelliSense PR #20156
  • Peter Juras (@peterjuras): Remove «JOAO» from Readme title PR #24491
  • @QwertyZW: Let the widgetactions debug UI reflect the state of a focused thread PR #23878
  • Rishii7 (@rishii7)

    • Fix #24240 PR #24371
    • Fix #24817 — Prevent overflow of the message in define keybinding widget. PR #24925
  • Rômulo Guimarães (@romulo1984): Update Exec param at code.desktop PR #24523
  • Seivan Heidari (@seivan): Fixes #4803: Adding support for swipe gestures on macOS. PR #23663
  • Tereza Tomcova (@the-ress): Fixes #13905: Set relaunch command for window PR #15407
  • Thomas Rayner (@ThmsRynr): Fix #24971. PowerShell Extension .bat & .exe Syntax Highlighting Error PR #24973
  • Naveen Kumar (@timbanaveen)

    • Adding ‘never show again’ in Git Extension PR #24654
    • Adding line and column support for terminal PR #24832

Contributions to :

  • Damien Guard (@damieng): Correct log message heading in protocol v1 PR 186
  • Lucian Wischik (@ljw1004): Change «utf8» to «utf-8» with a hyphen PR 199
  • cxxxr (@cxxxr): small corrections PR 205
  • Vlad Dumitrescu (@vladdu): small corrections PR 207

Contributions to :

  • Cam (@trixnz): Add return value to getEnvironment(). PR #189
  • Guillaume Martres (@smarter): Fix a single typo PR #196
  • Hyo Jeong (@asiandrummer): fix typo PR #200

Contributions to

  • Dominic Valenciana (@Kiricon): Added @error support for sass PR #24
  • Ryan O’Connor (@rocifier): added unit tests for real selector formatter and fixed indentation PR #26

Editor

There are new snippet variables that insert line or block comments, honoring the current language. Use and for block comments and otherwise.

The snippet below inserts in JavaScript files and in HTML files

Declaration versus definition

Until now, VS Code offered commands for displaying the definition of a symbol, for example Go to Definition and Peek Definition. This didn’t take into account the fact that some languages differentiate, stricter than others, between the declaration and the definition of a symbol. We have fixed that and there are now commands Go to Declaration and Peek Declaration for the declaration of a symbol.

The data required for language features like Go to Declaration is computed by extensions and there is a new API, which you can read about in the section.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector