Skip to content

Commit

Permalink
Merge remote-tracking branch 'Parent/main' into Current
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jan 9, 2025
2 parents e606979 + 06d82e9 commit 5d1de4e
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 24 deletions.
2 changes: 1 addition & 1 deletion api/extension-guides/language-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Once you've built the prompt for the language model, you first select the langua

To select the language model, you can specify the following properties: `vendor`, `id`, `family`, or `version`. Use these properties to either broadly match all models of a given vendor or family, or select one specific model by its ID. Learn more about these properties in the [API reference](/api/references/vscode-api#LanguageModelChat).

> **Note**: Currently, `gpt-4o`, `gpt-4o-mini`, `o1-preview`, `o1-mini`, `claude-3.5-sonnet`, `gemini-1.5-pro` are supported for the language model family. If you are unsure what model to use, we recommend `gpt-4o` for it's performance and quality. For interactions directly in the editor, we recommend `gpt-4o-mini` for it's performance.
> **Note**: Currently, `gpt-4o`, `gpt-4o-mini`, `o1`, `o1-mini`, `claude-3.5-sonnet` are supported for the language model family. If you are unsure what model to use, we recommend `gpt-4o` for it's performance and quality. For interactions directly in the editor, we recommend `gpt-4o-mini` for it's performance.
If there are no models that match the specified criteria, the `selectChatModels` method returns an empty array. Your extension must appropriately handle this case.

Expand Down
7 changes: 5 additions & 2 deletions api/references/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,12 @@ let success = await commands.executeCommand('vscode.openFolder', uri);
* _context_ - An InlineValueContext
* _(returns)_ - A promise that resolves to an array of InlineValue objects

`vscode.open` - Opens the provided resource in the editor.
`vscode.open` - Opens the provided resource in the editor. Can be a text or binary file, or an http(s) URL. If you need more control over the options for opening a text file, use `vscode.window.showTextDocument` instead.

* _Uri_ -
* _uri_ - Uri of a text or binary file, or an http(s) URL
* _columnOrOptions_ - (optional) Either the column in which to open, or editor options, see `vscode.TextDocumentShowOptions`
* _label_ - Editor label (optional)
* _(returns)_ - no result

`vscode.openWith` - Opens the provided resource with a specific editor.

Expand Down
2 changes: 2 additions & 0 deletions docs/containers/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ It is also possible to connect to the remote Docker engine directly using SSH tu

1. Use the **Command Palette** (`kb(workbench.action.showCommands)`) to issue the **Docker Contexts: Use** command to activate the Docker context pointing to the remote machine. This command causes both VS Code and Docker CLI to use the remote machine context.

If you don't have this command, make sure to install the [Docker extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker).
1. It is recommended to change the refresh rate to something longer than the default with the `docker.explorerRefreshInterval` setting. The connection over SSH is slow, and it can result in trying to refresh again before the previous refresh even finished. We recommend at least 3000 ms.
## Tips
Expand Down
4 changes: 3 additions & 1 deletion docs/cpp/config-mingw.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ with this:
### Modifying tasks.json
You can modify your `tasks.json` to build multiple C++ files by using an argument like `"${workspaceFolder}/*.cpp"` instead of `"${file}"`.This will build all `.cpp` files in your current folder. You can also modify the output filename by replacing `"${fileDirname}\\${fileBasenameNoExtension}.exe"` with a hard-coded filename (for example `"${workspaceFolder}\\myProgram.exe"`).
Starting November 3, 2024, MSYS2 has disabled wildcard support for `mingw-w64` by default. This change impacts how wildcards like `"*.cpp"` are processed in build commands. To build multiple C++ files in your `tasks.json`, you must explicitly list the files, use a build system like `make` or `cmake` or implement the following workarounds: https://www.msys2.org/docs/c/#expanding-wildcard-arguments.
If you previously used `"${workspaceFolder}/*.cpp"` to compile all `.cpp` files in the current folder, this will no longer work directly. Instead, you can manually list the files or define a build script.
## Debug helloworld.cpp
Expand Down
2 changes: 1 addition & 1 deletion docs/editor/emmet.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Authoring of Custom Snippets in Emmet 2.0 via the `snippets.json` file differs f

Topic | Old Emmet | Emmet 2.0
------ | -------- | ---------
Snippets vs Abbreviations | Supports both in 2 separate properties called `snippets` and `abbreviations` | The 2 have been combined into a single property called snippets. See default [HTML snippets](https://github.com/emmetio/snippets/blob/master/html.json) and [CSS snippets](https://github.com/emmetio/snippets/blob/master/css.json)
Snippets vs Abbreviations | Supports both in 2 separate properties called `snippets` and `abbreviations` | The 2 have been combined into a single property called snippets. See default [HTML snippets](https://github.com/emmetio/emmet/blob/master/src/snippets/html.json) and [CSS snippets](https://github.com/emmetio/emmet/blob/master/src/snippets/css.json)
CSS snippet names | Can contain `:` | Do not use `:` when defining snippet names. It is used to separate property name and value when Emmet tries to fuzzy match the given abbreviation to one of the snippets.
CSS snippet values | Can end with `;` | Do not add `;` at end of snippet value. Emmet will add the trailing `;` based on the file type (css/less/scss vs sass/stylus) or the emmet preference set for `css.propertyEnd`, `sass.propertyEnd`, `stylus.propertyEnd`
Cursor location | `${cursor}` or `\|` can be used | Use only textmate syntax like `${1}` for tab stops and cursor locations
Expand Down
8 changes: 4 additions & 4 deletions docs/editor/userdefinedsnippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you find an extension you want to use, install it, then restart VS Code and t

## Create your own snippets

You can easily define your own snippets without any extension. To create or edit your own snippets, select **Configure User Snippets** under **File** > **Preferences**, and then select the language (by [language identifier](/docs/languages/identifiers.md)) for which the snippets should appear, or the **New Global Snippets file** option if they should appear for all languages. VS Code manages the creation and refreshing of the underlying snippets file(s) for you.
You can easily define your own snippets without any extension. To create or edit your own snippets, select **Configure Snippets** under **File** > **Preferences**, and then select the language (by [language identifier](/docs/languages/identifiers.md)) for which the snippets should appear, or the **New Global Snippets file** option if they should appear for all languages. VS Code manages the creation and refreshing of the underlying snippets file(s) for you.

![snippet dropdown](images/userdefinedsnippets/snippet-dropdown.png)

Expand Down Expand Up @@ -88,15 +88,15 @@ Every snippet is scoped to one, several, or all ("global") languages based on wh
1. a **language** snippet file
2. a **global** snippet file

Single-language user-defined snippets are defined in a specific language's snippet file (for example `javascript.json`), which you can access by language identifier through **Snippets: Configure User Snippets**. A snippet is only accessible when editing the language for which it is defined.
Single-language user-defined snippets are defined in a specific language's snippet file (for example `javascript.json`), which you can access by language identifier through **Snippets: Configure Snippets**. A snippet is only accessible when editing the language for which it is defined.

Multi-language and global user-defined snippets are all defined in "global" snippet files (JSON with the file suffix `.code-snippets`), which is also accessible through **Snippets: Configure User Snippets**. In a global snippets file, a snippet definition may have an additional `scope` property that takes one or more [language identifiers](/docs/languages/identifiers.md), which makes the snippet available only for those specified languages. If no `scope` property is given, then the global snippet is available in **all** languages.
Multi-language and global user-defined snippets are all defined in "global" snippet files (JSON with the file suffix `.code-snippets`), which is also accessible through **Snippets: Configure Snippets**. In a global snippets file, a snippet definition may have an additional `scope` property that takes one or more [language identifiers](/docs/languages/identifiers.md), which makes the snippet available only for those specified languages. If no `scope` property is given, then the global snippet is available in **all** languages.

Most user-defined snippets are scoped to a single language, and so are defined in a language-specific snippet file.

### Project snippet scope

You can also have a global snippets file (JSON with file suffix `.code-snippets`) scoped to your project. Project-folder snippets are created with the **New Snippets file for '<folder-name>'...** option in the **Snippets: Configure User Snippets** dropdown menu and are located at the root of the project in a `.vscode` folder. Project snippet files are useful for sharing snippets with all users working in that project. Project-folder snippets are similar to global snippets and can be scoped to specific languages through the `scope` property.
You can also have a global snippets file (JSON with file suffix `.code-snippets`) scoped to your project. Project-folder snippets are created with the **New Snippets file for '<folder-name>'...** option in the **Snippets: Configure Snippets** dropdown menu and are located at the root of the project in a `.vscode` folder. Project snippet files are useful for sharing snippets with all users working in that project. Project-folder snippets are similar to global snippets and can be scoped to specific languages through the `scope` property.

## Snippet syntax

Expand Down
2 changes: 1 addition & 1 deletion docs/getstarted/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ See IntelliSense for your `package.json` file.

### Create custom snippets

**File** > **Preferences** > **Configure User Snippets**, select the language, and create a snippet.
**File** > **Preferences** > **Configure Snippets**, select the language, and create a snippet.

```json
"create component": {
Expand Down
2 changes: 2 additions & 0 deletions docs/python/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ If you enable pytest, VS Code prompts you to install the framework package if it

![VS Code prompt to install a test framework when enabled](images/testing/install-framework.png)

> **Note**: The minimum supported version of pytest for the python extension is 7.0.0.
## Create tests

Each test framework has its own conventions for naming test files and structuring the tests within, as described in the following sections. Each case includes two test methods, one of which is intentionally set to fail for the purposes of demonstration.
Expand Down
2 changes: 1 addition & 1 deletion docs/python/tutorial-flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ You can run the app at this point, but because you haven't made use of the base
Because the three pages you create in the next section extend `layout.html`, it saves time to create a **code snippet** to initialize a new template file with the appropriate reference to the base template. A code snippet provides a consistent piece of code from a single source, which avoids errors that can creep in when using copy-paste from existing code.
1. In VS Code, select **File** > **Preferences** > **Configure User Snippets**.
1. In VS Code, select **File** > **Preferences** > **Configure Snippets**.
1. In the list that appears, select **html**. The option may appear as "html.json" in the **Existing Snippets** section of the list if you've created snippets previously.
Expand Down
29 changes: 18 additions & 11 deletions docs/setup/enterprise.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Refer to the [network common hostnames list](/docs/setup/network.md#common-hostn

## Configure allowed extensions

The `extensions.allowed` application setting enables you to control which extensions can be installed in your organization. If the setting is not configured, all extensions are allowed. If the setting is configured, all extensions not listed are blocked from installing. If you block an extension or version that is already installed, the extension is disabled.
Configure the `extensions.allowed` application-wide setting in VS Code to control which extensions can be installed. If the setting is not configured, all extensions are allowed. If the setting is configured, all extensions not listed are blocked from installing. If you block an extension or version that is already installed, the extension is disabled.

To centrally manage allowed extensions for your organization, use [device management](#centrally-manage-allowed-extensions) like Windows group policies, to create a policy that overrides the VS Code setting on individual devices.

> [!NOTE]
> Support for allowed extensions is available starting from VS Code version 1.96.
Expand Down Expand Up @@ -80,9 +82,9 @@ Duplicate key values are not supported. For example, including both `"microsoft"

If you want to learn more about extensions in VS Code, refer to the [extensions documentation](/docs/editor/extension-marketplace.md).

### Control allowed extensions via device management
### Centrally manage allowed extensions

You can control the `extensions.allowed` setting by using [device management](#device-management). Use the `AllowedExtensions` VS Code policy, which overrides the `extensions.allowed` setting. The value of this policy is a JSON string that contains the allowed extensions.
Use [device management](#device-management) to centrally control which extensions are allowed to be installed in your organization. Configure the `AllowedExtensions` VS Code policy to override the corresponding `extensions.allowed` VS Code setting on users' devices. The value of this policy is a JSON string that contains the allowed extensions.

> [!IMPORTANT]
> If there's a syntax error in the policy value, the `extensions.allowed` setting is not applied. You can check the Window log in VS Code for errors (press `kb(workbench.action.showCommands)` and enter **Show Window Log**). In the Settings editor (`kb(workbench.action.openSettings)`), you can see a warning message for the `Extensions: Allowed` setting that the setting value was not applied.
Expand All @@ -91,7 +93,7 @@ You can control the `extensions.allowed` setting by using [device management](#d

## Configure automatic updates

The `update.mode` setting controls whether VS Code automatically updates when a new version is released. The updates are fetched from a Microsoft online service.
The `update.mode` VS Code setting controls whether VS Code automatically updates when a new version is released. The updates are fetched from a Microsoft online service.

The setting has the following options:

Expand All @@ -100,32 +102,37 @@ The setting has the following options:
* `start` - only check for updates when VS Code starts, automatic checking for updates is disabled
* `default` - automatic checking for updates is enabled and runs in the background periodically

### Control update mode via device management
### Centrally manage automatic updates

You can control the `update.mode` setting by using [device management](#device-management). Use the `UpdateMode` VS Code policy, which overrides the `update.mode` setting. The value of this policy is a string that contains the update mode.
Use [device management](#device-management) to centrally control how VS Code manages updates across devices in your organization. Configure the `UpdateMode` VS Code policy, which overrides the corresponding `update.mode` VS Code setting on users's devices. The value of this policy is a string that contains the update mode.

## Device management

You can control specific features of VS Code through device management solutions to ensure it meets the needs of your organization.

### Admin-controlled features
VS Code currently supports the following admin-controlled features:

| Policy | Description | VS Code setting |
| ------ | ----------- | --------------- |
| `AllowedExtensions` | Controls which extensions can be installed. | `extensions.allowed` |
| `UpdateMode` | Controls whether VS Code automatically updates when a new version is released. | `update.mode` |

* Automatic updates (`update.mode`)
* Allowed extensions (`extensions.allowed`)
> [!NOTE]
> Currently, VS Code only supports Windows group policies. Support for configuration profiles on macOS is coming soon ([tracking issue](https://github.com/microsoft/vscode/issues/148942)).
### Group Policy on Windows

System administrators need a way to control default software settings across all client machines in their organization. Group Policy is a client solution that gives administrators flexibility to implement the behavior for each of the available policies and settings.

VS Code now has support for [Windows Registry-based Group Policy](https://learn.microsoft.com/previous-versions/windows/desktop/policy/implementing-registry-based-policy). Starting from VS Code version 1.69, each release will ship with a `policies` directory containing ADMX template files that can be added to the following path: `C:\Windows\PolicyDefinitions`. Make sure to also copy the corresponding `adml` file to the `C:\Windows\PolicyDefinitions\<your-locale>` directory.
VS Code has support for [Windows Registry-based Group Policy](https://learn.microsoft.com/previous-versions/windows/desktop/policy/implementing-registry-based-policy). Starting from VS Code version 1.69, each release ships with a `policies` directory containing ADMX template files that can be added to the following path: `C:\Windows\PolicyDefinitions`. Make sure to also copy the corresponding `adml` file to the `C:\Windows\PolicyDefinitions\<your-locale>` directory.

Once the policy definitions are installed, admins can use the [Local Group Policy Editor](https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn265982(v=ws.11)) to manage the policy values.

Policies can be set both at the Computer level and the User level. If both are set, Computer level will take precedence. When a policy value is set, the value overrides the VS Code [setting](/docs/getstarted/settings.md) value configured at any level (default, user, workspace, etc.).

### Additional policies

The goal is to promote current VS Code settings as Policies and closely follow existing settings, so that the naming and behavior are consistent. If there are requests to enact more policies, please open an issue in the VS Code [GitHub repository](https://github.com/microsoft/vscode/issues). The team will determine if there is already a corresponding setting for the behavior or if a new setting should be created to control the desired behavior.
The goal is to promote current VS Code settings as policies and closely follow existing settings, so that the naming and behavior are consistent. If there are requests to enact more policies, please open an issue in the VS Code [GitHub repository](https://github.com/microsoft/vscode/issues). The team will determine if there is already a corresponding setting for the behavior or if a new setting should be created to control the desired behavior.

## Set up VS Code with preinstalled extensions

Expand Down
12 changes: 11 additions & 1 deletion docs/setup/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,17 @@ Using the Registry Editor (regedit):

### Unable to run as admin when AppLocker is enabled

With the introduction of process sandboxing (discussed in this [blog post](https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox)) running as administrator is currently unsupported when AppLocker is configured due to a limitation of the runtime sandbox. If your work requires that you run VS Code from an elevated terminal, you can launch `code` with `--no-sandbox --disable-gpu-sandbox` as a workaround.
With the introduction of process sandboxing (discussed in this [blog post](https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox)) running as administrator is currently unsupported when AppLocker is configured due to a limitation of the runtime sandbox.

If your work requires that you run VS Code from an elevated terminal:

1. In VS Code, run the **Preferences: Configure Runtime Arguments** command in the Command Palette (`kb(workbench.action.showCommands)`)

This command opens an `argv.json` file to configure runtime arguments for VS Code. You might see some default arguments there already.

1. Add `"disable-chromium-sandbox": true` to the `argv.json` file.

1. Restart VS Code. You should now be able to run VS Code in an elevated terminal.

Subscribe to [issue #122951](https://github.com/microsoft/vscode/issues/122951) to receive updates.

Expand Down
Loading

0 comments on commit 5d1de4e

Please sign in to comment.