mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
exclude vscode-markdown and already entered extensions
This commit is contained in:
parent
a901530929
commit
4ceb904f33
|
@ -70,10 +70,17 @@ function registerExtensionsCompletions(): vscode.Disposable {
|
|||
const location = getLocation(document.getText(), document.offsetAt(position));
|
||||
const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
|
||||
if (location.path[0] === 'recommendations') {
|
||||
const config = vscode.workspace && vscode.workspace.getConfiguration('extensions.json');
|
||||
const alreadyEnteredExtensions = config.get<string[]>('recommendations') || [];
|
||||
return vscode.extensions.all
|
||||
.filter(e => !e.id.startsWith('vscode.'))
|
||||
.filter(e => !(
|
||||
e.id.startsWith('vscode.')
|
||||
|| e.id === 'Microsoft.vscode-markdown'
|
||||
|| alreadyEnteredExtensions.indexOf(e.id) > -1
|
||||
))
|
||||
.map(e => newSimpleCompletionItem(e.id, range, undefined, '"' + e.id + '"'));
|
||||
}
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue