提交 a3837d1a 编写于 作者: P Pine Wu

Fix #79844

上级 9588e378
......@@ -35,26 +35,6 @@ export function getCustomDataPathsInAllWorkspaces(workspaceFolders: WorkspaceFol
}
});
workspaceFolders.forEach(wf => {
const allCssConfig = workspace.getConfiguration(undefined, wf.uri);
const wfCSSConfig = allCssConfig.inspect<ExperimentalConfig>('css');
if (
wfCSSConfig &&
wfCSSConfig.workspaceFolderValue &&
wfCSSConfig.workspaceFolderValue.experimental &&
wfCSSConfig.workspaceFolderValue.experimental.customData
) {
const customData = wfCSSConfig.workspaceFolderValue.experimental.customData;
if (Array.isArray(customData)) {
customData.forEach(t => {
if (typeof t === 'string') {
dataPaths.push(path.resolve(wf.uri.fsPath, t));
}
});
}
}
});
return dataPaths;
}
......@@ -70,19 +50,6 @@ export function getCustomDataPathsFromAllExtensions(): string[] {
dataPaths.push(path.resolve(extension.extensionPath, rp));
});
}
if (
contributes &&
contributes.css &&
contributes.experimental &&
contributes.css.experimental.customData &&
Array.isArray(contributes.css.experimental.customData)
) {
const relativePaths: string[] = contributes.css.experimental.customData;
relativePaths.forEach(rp => {
dataPaths.push(path.resolve(extension.extensionPath, rp));
});
}
}
return dataPaths;
......
......@@ -43,16 +43,6 @@
},
"scope": "resource"
},
"css.experimental.customData": {
"type": "array",
"description": "A list of JSON file paths that define custom CSS data that loads custom properties, at directives, pseudo classes / elements.",
"default": [],
"items": {
"type": "string"
},
"scope": "resource",
"deprecationMessage": "This setting is no longe experimental. Use `css.customData` instead."
},
"css.completion.triggerPropertyValueCompletion": {
"type": "boolean",
"scope": "resource",
......
......@@ -34,22 +34,6 @@ export function getCustomDataPathsInAllWorkspaces(workspaceFolders: WorkspaceFol
});
}
}
if (
wfHtmlConfig &&
wfHtmlConfig.workspaceFolderValue &&
wfHtmlConfig.workspaceFolderValue.experimental &&
wfHtmlConfig.workspaceFolderValue.experimental.customData
) {
const customData = wfHtmlConfig.workspaceFolderValue.experimental.customData;
if (Array.isArray(customData)) {
customData.forEach(t => {
if (typeof t === 'string') {
dataPaths.push(path.resolve(wf.uri.fsPath, t));
}
});
}
}
});
return dataPaths;
......@@ -61,30 +45,12 @@ export function getCustomDataPathsFromAllExtensions(): string[] {
for (const extension of extensions.all) {
const contributes = extension.packageJSON && extension.packageJSON.contributes;
if (
contributes &&
contributes.html &&
contributes.html.customData &&
Array.isArray(contributes.html.customData)
) {
if (contributes && contributes.html && contributes.html.customData && Array.isArray(contributes.html.customData)) {
const relativePaths: string[] = contributes.html.customData;
relativePaths.forEach(rp => {
dataPaths.push(path.resolve(extension.extensionPath, rp));
});
}
if (
contributes &&
contributes.html &&
contributes.html.experimental &&
contributes.html.experimental.customData &&
Array.isArray(contributes.html.experimental.customData)
) {
const relativePaths: string[] = contributes.html.experimental.customData;
relativePaths.forEach(rp => {
dataPaths.push(path.resolve(extension.extensionPath, rp));
});
}
}
return dataPaths;
......
......@@ -41,16 +41,6 @@
},
"scope": "resource"
},
"html.experimental.customData": {
"type": "array",
"description": "A list of JSON file paths that define custom tags, properties and other HTML syntax constructs. Only workspace folder setting will be read.",
"default": [],
"items": {
"type": "string"
},
"scope": "resource",
"deprecationMessage": "This setting is no longe experimental. Use `html.customData` instead."
},
"html.format.enable": {
"type": "boolean",
"scope": "window",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册