mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Part of #79964
This commit is contained in:
@@ -45,32 +45,6 @@ export function activate(context: ExtensionContext) {
|
||||
},
|
||||
initializationOptions: {
|
||||
dataPaths
|
||||
},
|
||||
middleware: {
|
||||
async provideCompletionItem(document, position, context, token, next) {
|
||||
const result = await next(document, position, context, token);
|
||||
if (result) {
|
||||
if (isArray(result)) {
|
||||
return result.map(r => {
|
||||
return {
|
||||
...r,
|
||||
tags: (r as any).deprecated ? [CompletionItemTag.Deprecated] : undefined
|
||||
};
|
||||
});
|
||||
} else {
|
||||
return {
|
||||
isIncomplete: result.isIncomplete,
|
||||
items: result.items.map(r => {
|
||||
return {
|
||||
...r,
|
||||
tags: (r as any).deprecated ? [CompletionItemTag.Deprecated] : undefined
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user