Skip to content

Commit 072ce6d

Browse files
Add call out for onLanguage wildcard (#6156)
This shipped a bit ago which is why the PR is in to main instead of vnext. cc @joyceerhl
1 parent e3f9b0b commit 072ce6d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

api/references/activation-events.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ Multiple languages can be declared with separate `onLanguage` entries in the `ac
5555

5656
> **Note**: Beginning with VS Code 1.74.0, languages contributed by your extension do not require a corresponding `onLanguage` activation event declaration for your extension to be activated.
5757
58+
Additionally, if your extension needs to be activated before any language is used, you can use the generic `onLanguage` activation event to ensure this:
59+
60+
```json
61+
"activationEvents": [
62+
"onLanguage"
63+
]
64+
```
65+
66+
> **Note**: It is best practice to activate only when a user needs your extension. If your extension works on a subset of languages, it is better for the user to list that subset than to activate on all languages.
67+
5868
## onCommand
5969

6070
This activation event is emitted and interested extensions will be activated whenever a command is being invoked:

0 commit comments

Comments
 (0)