You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/references/contribution-points.md
+17-24Lines changed: 17 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ See the [Commands Extension Guide](https://code.visualstudio.com/api/extension-g
141
141
142
142
## contributes.configuration
143
143
144
-
Contribute configuration keys that will be exposed to the user. The user will be able to set these configuration options in the Settings editor or by editing a settings.json file directly.
144
+
Contribute settings that will be exposed to the user. The user will be able to set these configuration options in the Settings editor or by editing a settings.json file directly.
145
145
146
146
This section can either be a single object, representing a single category of settings, or an array of objects, representing multiple categories of settings. If there are multiple categories of settings, the Settings editor will show a submenu in the table of contents for that extension, and the title keys will be used for the submenu entry names.
147
147
@@ -191,7 +191,7 @@ The `title` 1️⃣️ of a category is the heading used for that category.
191
191
}
192
192
```
193
193
194
-
Note that if the extension has multiple categories of extensions, and the title of one of the categories is the same as the extension display name, then the settings for that category will be placed directly below the main extension heading, no matter what the `order` field is set to.
194
+
For an extension with multiple categories of settings, if the title of one of the categories is the same as the extension's display name, then the settings UI will treat that category as a "default category", ignoring the `order` field for that category and placing its settings below the main extension heading.
195
195
196
196
For both the `title` and `displayName` fields, words like "Extension", "Configuration", and "Settings" are redundant.
197
197
@@ -202,32 +202,25 @@ For both the `title` and `displayName` fields, words like "Extension", "Configur
202
202
203
203
#### properties
204
204
205
-
The `properties` 2️⃣ in your configurationwill be a dictionary of configuration properties.
205
+
The `properties` 2️⃣ in your `configuration` object will form a dictionary where the keys are setting IDs and the values give more information on the setting. Though an extension can contain multiple categories of settings, each setting of the extension must still have its own unique ID. A setting ID cannot be a complete prefix of another setting ID.
206
206
207
-
In the settings UI, your configuration key will be used to namespace and construct a title. Though an extension can contain multiple categories of settings, each setting of the extension must still have its own unique key. Capital letters in your key are used to indicate word breaks. For example, if your key is `gitMagic.blame.dateFormat`, the generated title for the setting will look like this:
207
+
Properties without an explicit `order` field will appear in lexicographical order in the settings UI (**not**the order in which they're listed in the manifest).
208
208
209
-
> Blame: **Date Format**
209
+
### Setting titles
210
210
211
-
Entries will be grouped according to the hierarchy established in your keys. So for example, these entries
211
+
In the settings UI, multiple fields will be used to construct a display title for each setting. Capital letters in your key are used to indicate word breaks.
212
212
213
-
```text
214
-
gitMagic.blame.dateFormat
215
-
gitMagic.blame.format
216
-
gitMagic.blame.heatMap.enabled
217
-
gitMagic.blame.heatMap.location
218
-
```
213
+
#### Display titles for single-category and default category configurations
214
+
215
+
If the configuration has a single category of settings, or if the category has the same title as the extension's display name, then for settings within that category, the settings UI will use the settings ID and the extension `name` field to determine the display title.
216
+
217
+
As an example, for settings ID `gitMagic.blame.dateFormat` and extension name `authorName.gitMagic`, because the prefix of the settings ID matches with the suffix of the extension name, the `gitMagic` part of the settings ID will be removed in the display title: "Blame: **Date Format**".
219
218
220
-
will appear in a single group like this:
219
+
#### Display titles for multi-category configurations
221
220
222
-
> Blame: **Date Format**
223
-
>
224
-
> Blame: **Format**
225
-
>
226
-
> Blame › Heat Map: **Enabled**
227
-
>
228
-
> Blame › Heat Map: **Location**
221
+
If the configuration has multiple categories of settings, and the category does not have the same title as the extension's display name, then for settings within that category, the settings UI will use the settings ID and the category `id` field to determine the display title.
229
222
230
-
Otherwise, properties without an explicit order field appear in alphabetical order (**not**the order in which they're listed in the manifest).
223
+
As an example, for settings ID `css.completion.completePropertyWithSemicolon` and category ID `css`, because the prefix of the settings ID matches with the suffix of the category ID, the `css` part of the settings ID will be removed in the settings UI, and the generated title for the setting will be "Completion: **Complete Property With Semicolon**".
231
224
232
225
### Configuration property schema
233
226
@@ -246,7 +239,7 @@ Your `description` 3️⃣ appears after the title and before the input field, e
246
239
}
247
240
```
248
241
249
-
If you use `markdownDescription` instead of `description`, your setting description will be rendered as Markdown in the settings UI.
242
+
If you use `markdownDescription` instead of `description`, your setting description will be parsed as Markdown in the settings UI.
250
243
251
244
```json
252
245
{
@@ -274,7 +267,7 @@ Entries of type `number` 4️⃣ , `string` 5️⃣ , `boolean` 6️⃣ can be e
274
267
275
268
A string setting can be rendered with a multiline text input if it sets `"editPresentation": "multilineText"` on the configuration entry.
276
269
277
-
For `boolean` entries, the `description` (or `markdownDescription`) will be used as the label for the checkbox.
270
+
For `boolean` entries, the `markdownDescription` (or `description` if `markdownDescription` is not specified) will be used as the label next to the checkbox.
278
271
279
272
```json
280
273
{
@@ -297,7 +290,7 @@ If two categories have `order` properties, the category with the lower order num
297
290
298
291
If two settings within the same category have `order` properties, the setting with the lower order number comes first. If another setting within that same category is not given an `order` property, it will appear after settings in that category that were given that property.
299
292
300
-
If two categories have the same `order` property value, or if two settings within the same category have the same `order` property value, then they will be sorted in increasing alphabetical order within the settings UI.
293
+
If two categories have the same `order` property value, or if two settings within the same category have the same `order` property value, then they will be sorted in increasing lexicographical order within the settings UI.
0 commit comments