This commit is contained in:
Pine Wu
2019-10-22 14:18:40 -07:00
parent c928a447a0
commit 7fa28ec9d3
5 changed files with 10 additions and 36 deletions

View File

@@ -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;
}
}
};