microsoft / microsoft/vscode

setting workbench.editorAssociations does not applyToAllProfiles

Open
#327,755 0 comments 0 reactions 1 assignee Claimed by @sandy081 View on GitHub
bug user-profiles
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Does this issue occur when all extensions are disabled?: **Yes**

- VS Code Version: 1.130
- OS Version: win10 x64

Steps to Reproduce:

# preparation
1. create a test markdown file `a.md` in a workspace `wsA`
```markdown
[a](a.jpg)
```

2. create a user profile `Test` besides the `Default`.

- in `Default` user profile `user\settings.json`:

```json
"workbench.settings.applyToAllProfiles": ["workbench.editorAssociations"],

"workbench.editorAssociations": {
"*.jpg": "default"
}
```

- in `Test` user profile `user\profiles\-xxxx\settings.json`: nothing
- in workspace setting `.vscode\settings.json`: nothing

# test result
3. open workspace `wsA` and file `a.md` under `Default` profile
ctrl+click the link, vscode uses **default** (the editor itself) to open a.jpg. It shows an exclamation mark icon, which is easy to confirm and **expected**.

4. open workspace `wsA` and file `a.md` under `Test` profile
- ctrl+click the link, vscode dose not use default, but the **previewEditor** to open a.jpg. This is **unexpected**, since the setting has been configured as applyToAllProfiles.
- when `"*.jpg": "default"` is copied into `Test` user profile or workspace setting, it uses **default as expected** .

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.