mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
fix #20049
This commit is contained in:
parent
7f8173680f
commit
eff9148502
|
@ -79,14 +79,14 @@ function registerSettingsCompletions(): vscode.Disposable {
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('assocLabelFile', "Files with Extension"),
|
label: localize('assocLabelFile', "Files with Extension"),
|
||||||
documentation: localize('assocDescriptionFile', "Map all files matching the glob pattern in their filename to the language with the given identifier."),
|
documentation: localize('assocDescriptionFile', "Map all files matching the glob pattern in their filename to the language with the given identifier."),
|
||||||
snippet: '"*.${1:extension}": "${2:language}"',
|
snippet: location.isAtPropertyKey ? '"*.${1:extension}": "${2:language}"' : '{ "*.${1:extension}": "${2:language}" }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
|
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('assocLabelPath', "Files with Path"),
|
label: localize('assocLabelPath', "Files with Path"),
|
||||||
documentation: localize('assocDescriptionPath', "Map all files matching the absolute path glob pattern in their path to the language with the given identifier."),
|
documentation: localize('assocDescriptionPath', "Map all files matching the absolute path glob pattern in their path to the language with the given identifier."),
|
||||||
snippet: '"/${1:path to file}/*.${2:extension}": "${3:language}"',
|
snippet: location.isAtPropertyKey ? '"/${1:path to file}/*.${2:extension}": "${3:language}"' : '{ "/${1:path to file}/*.${2:extension}": "${3:language}" }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -110,42 +110,42 @@ function registerSettingsCompletions(): vscode.Disposable {
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('fileLabel', "Files by Extension"),
|
label: localize('fileLabel', "Files by Extension"),
|
||||||
documentation: localize('fileDescription', "Match all files of a specific file extension."),
|
documentation: localize('fileDescription', "Match all files of a specific file extension."),
|
||||||
snippet: '"**/*.${1:extension}": true',
|
snippet: location.isAtPropertyKey ? '"**/*.${1:extension}": true' : '{ "**/*.${1:extension}": true }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
|
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('filesLabel', "Files with Multiple Extensions"),
|
label: localize('filesLabel', "Files with Multiple Extensions"),
|
||||||
documentation: localize('filesDescription', "Match all files with any of the file extensions."),
|
documentation: localize('filesDescription', "Match all files with any of the file extensions."),
|
||||||
snippet: '"**/*.{ext1,ext2,ext3}": true',
|
snippet: location.isAtPropertyKey ? '"**/*.{ext1,ext2,ext3}": true' : '{ "**/*.{ext1,ext2,ext3}": true }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
|
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('derivedLabel', "Files with Siblings by Name"),
|
label: localize('derivedLabel', "Files with Siblings by Name"),
|
||||||
documentation: localize('derivedDescription', "Match files that have siblings with the same name but a different extension."),
|
documentation: localize('derivedDescription', "Match files that have siblings with the same name but a different extension."),
|
||||||
snippet: '"**/*.${1:source-extension}": { "when": "$(basename).${2:target-extension}" }',
|
snippet: location.isAtPropertyKey ? '"**/*.${1:source-extension}": { "when": "$(basename).${2:target-extension}" }' : '{ "**/*.${1:source-extension}": { "when": "$(basename).${2:target-extension}" } }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
|
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('topFolderLabel', "Folder by Name (Top Level)"),
|
label: localize('topFolderLabel', "Folder by Name (Top Level)"),
|
||||||
documentation: localize('topFolderDescription', "Match a top level folder with a specific name."),
|
documentation: localize('topFolderDescription', "Match a top level folder with a specific name."),
|
||||||
snippet: '"${1:name}": true',
|
snippet: location.isAtPropertyKey ? '"${1:name}": true' : '{ "${1:name}": true }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
|
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('topFoldersLabel', "Folders with Multiple Names (Top Level)"),
|
label: localize('topFoldersLabel', "Folders with Multiple Names (Top Level)"),
|
||||||
documentation: localize('topFoldersDescription', "Match multiple top level folders."),
|
documentation: localize('topFoldersDescription', "Match multiple top level folders."),
|
||||||
snippet: '"{folder1,folder2,folder3}": true',
|
snippet: location.isAtPropertyKey ? '"{folder1,folder2,folder3}": true' : '{ "{folder1,folder2,folder3}": true }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
|
|
||||||
completions.push(newSnippetCompletionItem({
|
completions.push(newSnippetCompletionItem({
|
||||||
label: localize('folderLabel', "Folder by Name (Any Location)"),
|
label: localize('folderLabel', "Folder by Name (Any Location)"),
|
||||||
documentation: localize('folderDescription', "Match a folder with a specific name in any location."),
|
documentation: localize('folderDescription', "Match a folder with a specific name in any location."),
|
||||||
snippet: '"**/${1:name}": true',
|
snippet: location.isAtPropertyKey ? '"**/${1:name}": true' : '{ "**/${1:name}": true }',
|
||||||
range
|
range
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue