vscode-docs/release-notes/v1_49.md

158 строки
8.4 KiB
Markdown
Исходник Обычный вид История

2020-08-14 19:32:40 +03:00
---
Order: 58
TOCTitle: August 2020
PageTitle: Visual Studio Code August 2020
MetaDescription: Learn what is new in the Visual Studio Code August 2020 Release (1.49)
MetaSocialImage: 1_49/release-highlights.png
Date: 2020-9-12
DownloadVersion: 1.49.0
---
# August 2020 (version 1.49)
<!-- DOWNLOAD_LINKS_PLACEHOLDER -->
Welcome to the Insiders build. These are the preliminary notes for the August 1.49 release of Visual Studio Code. As we get closer to the release date, you'll find details below about new features and important fixes.
Until the August milestone release notes are available, you can still track our progress:
2020-08-18 20:54:32 +03:00
* **[August iteration plan](https://github.com/microsoft/vscode/issues/104735)** - Review what's planned for the milestone.
2020-08-14 19:32:40 +03:00
* **[Commit log](https://github.com/Microsoft/vscode/commits/master)** - GitHub commits to the vscode open-source repository.
* **[Closed issues](https://github.com/Microsoft/vscode/issues?q=is%3Aissue+milestone%3A%22August+2020%22+is%3Aclosed)** - Resolved bugs and implemented feature requests in the milestone.
We really appreciate people trying our new features as soon as they are ready, so check back here often and learn what's new.
If you find issues or have suggestions, you can enter them in the [VS Code repository](https://github.com/Microsoft/vscode/issues) on GitHub.
2020-09-03 13:28:32 +03:00
## Editor
### Only Format Modified Ranges
When contributing to another project, "Format on Save" and "Format Document" can get in your way because they format lines that you have not changed. This makes pull requests large and is often unwanted. There is new feature to help with that:
* We added a new command "Format Modified Lines" which allows to manually format new and changes lines
* There is a new setting `editor.formatOnSaveMode` which makes "Format on Save" only format modified lines
Note, that modifications are defined by your source control provider, e.g changes in git, and that without changes in source control no modified lines are formatted. The quick diff indicator is a reliable hint for what lines will be formatted.
![Format Modified](images/1_49/format_modified.gif)
This also requires a formatter that supports to format a portion of a document - which popular formatter do.
### Format Multiple Selections
Also, the "Format Selection" command is now multi-cursor aware. Select multiple lines or statements, trigger "Format Selection", and you are set.
2020-09-03 22:14:58 +03:00
## Contributions to extensions
### Notebooks
2020-09-03 23:59:43 +03:00
**Improve cell execution order label discoverability**
2020-09-03 22:14:58 +03:00
2020-09-03 23:59:43 +03:00
Previously, the cell execute button would take the place of the execution order label when hovering or selecting a cell. This made it impossible to see the execution order label while executing a cell. We have moved it to sit below the execute button, aligned with the base of the editor. This should make it easier to find. (In this example, it's the `[6]`):
![cell execution order](./images/1_49/cell_execution_order.png)
**Customize cell appearance**
We've added two settings that let users customize the cell appearance:
- `notebook.cellToolbarLocation`: Whether the toolbar should be shown on the left, the right, or hidden
- `notebook.showCellStatusBar`: Whether or not the cell status bar should be visible
**Cell status bar item contributions**
It's now possible for extensions to contribute custom items to the cell status bar, similarly to the VS Code status bar. These items can be buttons that trigger commands, or just plain text items. As an example, our Github issues notebook extension now contributes the "Open x results" command as a status bar item:
![cell statusbar item](./images/1_49/cell_status_bar_item.png)
2020-09-03 22:14:58 +03:00
2020-09-03 18:33:19 +03:00
## Extension authoring
### Terminal link providers
2020-09-03 18:36:57 +03:00
The terminal link provider API is now stable. This API enables language/lint extensions to handle more obscure link formats that are not already supported and even support language-specific behavior.
Take the following Java exception for example:
```
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 9
at MyProgram.main(MyFile.java:10)
```
Using terminal link providers it is now possible to have a link for `java.lang.ArrayIndexOutOfBoundsException` that goes to API docs and create links for the symbols `MyProgram` or `main`.
The following example implementation creates a link for the first instance of the word `"test"` on each line:
2020-09-03 18:33:19 +03:00
```ts
window.registerTerminalLinkProvider({
provideTerminalLinks: (context, token) => {
// Detect the first instance of the word "test" if it exists and linkify it
const startIndex = (context.line as string).indexOf('test');
if (startIndex === -1) {
return [];
}
// Return an array of link results, this example only returns a single link
return [
{
startIndex,
length: 'test'.length,
tooltip: 'Show a notification',
// You can return data in this object to access inside handleTerminalLink
data: 'Example data'
}
];
},
handleTerminalLink: (link: any) => {
vscode.window.showInformationMessage(`Link activated (data = ${link.data})`);
}
});
```
2020-08-28 11:59:16 +03:00
## Engineering
### Web Playground moved to a separate repository
The extension that drives our [online web playground](https://vscode-web-test-playground.azurewebsites.net/) as well as `yarn web` when running out of sources moved into it's own [repository](https://github.com/microsoft/vscode-web-playground).
### Web Playground support for different versions
Our [online web playground](https://vscode-web-test-playground.azurewebsites.net/) is now capable of running not only the latest insiders version of VSCode, but also the stable version or any released version by commit. New query parameters allow to drive this:
* `quality=<stable|insider>`
* `commit=<commit-sha>`
**Note:** if you specify a `commit` you must also specify it's associated `quality`.
### Minimal sandboxed workbench
We continue to explore enabling Electron's `sandbox` option in VSCode. During this milestone, we worked on allowing to bring up a minimal VSCode instance that is fully sandboxed by shimming a lot of the internals that today still require node.js access. This will be a multi-milestone journey and progress can be tracked at https://github.com/microsoft/vscode/issues/92164.
2020-09-03 13:28:32 +03:00
### Making VS Code Trusted Types compliant
We have started an effort to make VS Code "Trusted Types" compliant. The goal is to prevent DOM-based cross site scripting vulnerabilities. Learn more about trusted types here: https://web.dev/trusted-types/, follow our process here: https://github.com/microsoft/vscode/issues/103699
2020-08-28 11:59:16 +03:00
## Notable fixes
2020-09-03 20:08:56 +03:00
* [38137](https://github.com/microsoft/vscode/issues/38137): Can't call sendText API or paste into terminal with long text
2020-08-28 11:59:16 +03:00
* [82604](https://github.com/microsoft/vscode/issues/82604): Web: editor does not provide a "Paste" action
* [105481](https://github.com/microsoft/vscode/issues/105481): macOS: detect high contrast theme
* [101110](https://github.com/microsoft/vscode/issues/101110): Allow to configure workbench.editor.restoreViewState per language
* [103052](https://github.com/microsoft/vscode/issues/103052): Order of files in "Search files by name" results is incorrect
2020-08-19 12:15:23 +03:00
## Thank you
Last but certainly not least, a big *__Thank You__* to the following people who contributed this month to VS Code:
2020-09-01 17:11:45 +03:00
Contributions to `vscode-eslint`:
* [Haojian Wu (@hokein)](https://github.com/hokein): Expose restartTimes to client. [PR #658](https://github.com/microsoft/vscode-languageserver-node/pull/658)
2020-08-19 12:15:23 +03:00
Contributions to `language-server-protocol`:
2020-08-19 12:31:20 +03:00
* [Daniel Mangum (@hasheddan)](https://github.com/hasheddan): Fix typo in v3.16 semantic tokens section [PR #1064](https://github.com/microsoft/language-server-protocol/pull/1064)
* [Danny Tuppeny (@DanTup)](https://github.com/DanTup): Add capabilities fields for semantic tokens [PR #1068](https://github.com/microsoft/language-server-protocol/pull/1068)
2020-09-01 17:22:40 +03:00
* [Titouan Vervack (@tivervac)](https://github.com/tivervac): Fixed typos in ConfigurationItem's documentation [PR #1081](https://github.com/microsoft/language-server-protocol/pull/1081)
2020-08-19 12:15:23 +03:00
2020-08-14 19:32:40 +03:00
<!-- In-product release notes styles. Do not modify without also modifying regex in gulpfile.common.js -->
<a id="scroll-to-top" role="button" title="Scroll to top" aria-label="scroll to top" href="#"><span class="icon"></span></a>
2020-08-14 20:02:45 +03:00
<link rel="stylesheet" type="text/css" href="css/inproduct_releasenotes.css"/>