searchTerms -> keywords

This commit is contained in:
Matt Bierner
2026-02-10 14:24:13 -08:00
parent 8efd494dc8
commit b3c0c092b3
5 changed files with 9 additions and 9 deletions

View File

@@ -201,9 +201,9 @@ export interface IConfigurationPropertySchema extends IJSONSchema {
enumItemLabels?: string[];
/**
* Optional terms used for search purposes.
* Optional keywords used for search purposes.
*/
searchTerms?: string[];
keywords?: string[];
/**
* When specified, controls the presentation format of string settings.

View File

@@ -116,12 +116,12 @@ const configurationEntrySchema: IJSONSchema = {
type: 'boolean',
description: nls.localize('scope.ignoreSync', 'When enabled, Settings Sync will not sync the user value of this configuration by default.')
},
searchTerms: {
keywords: {
type: 'array',
items: {
type: 'string'
},
description: nls.localize('scope.searchTerms', 'A list of additional search terms that help users find this setting in the Settings editor. These are not shown to the user.')
description: nls.localize('scope.keywords', 'A list of keywords that help users find this setting in the Settings editor. These are not shown to the user.')
},
tags: {
type: 'array',

View File

@@ -242,9 +242,9 @@ export class SettingMatches {
// Search the description if we found non-contiguous key matches at best.
const hasContiguousKeyMatchTypes = this.matchType >= SettingMatchType.ContiguousWordsInSettingsLabel;
if (this.searchDescription && !hasContiguousKeyMatchTypes) {
// Search the description lines and any additional search terms.
const searchableLines = setting.searchTerms?.length
? [...setting.description, setting.searchTerms.join(' ')]
// Search the description lines and any additional keywords.
const searchableLines = setting.keywords?.length
? [...setting.description, setting.keywords.join(' ')]
: setting.description;
for (const word of queryWords) {
for (let lineIndex = 0; lineIndex < searchableLines.length; lineIndex++) {

View File

@@ -64,7 +64,7 @@ export interface ISetting {
value: any;
valueRange: IRange;
description: string[];
searchTerms?: string[];
keywords?: string[];
descriptionIsMarkdown?: boolean;
descriptionRanges: IRange[];
overrides?: ISetting[];

View File

@@ -723,7 +723,7 @@ export class DefaultSettings extends Disposable {
value,
description: descriptionLines,
descriptionIsMarkdown: !!prop.markdownDescription,
searchTerms: prop.searchTerms,
keywords: prop.keywords,
range: nullRange,
keyRange: nullRange,
valueRange: nullRange,