Skip to content

Commit

Permalink
Fix the format style, to make CI happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
hokein committed Sep 1, 2020
1 parent c914310 commit a5ae410
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ export async function activate(context: vscode.ExtensionContext) {
// We also mark the list as incomplete to force retrieving new rankings.
// See https://github.com/microsoft/language-server-protocol/issues/898
middleware: {
provideCompletionItem:
async (document, position, context, token, next) => {
let list = await next(document, position, context, token);
let items = (Array.isArray(list) ? list : list.items).map(item => {
// Gets the prefix used by VSCode when doing fuzzymatch.
let prefix = document.getText(new vscode.Range(
(item.range as vscode.Range).start, position))
if (prefix)
item.filterText = prefix + '_' + item.filterText;
return item;
})
return new vscode.CompletionList(items, /*isIncomplete=*/ true);
},
provideCompletionItem: async (document, position, context, token,
next) => {
let list = await next(document, position, context, token);
let items = (Array.isArray(list) ? list : list.items).map(item => {
// Gets the prefix used by VSCode when doing fuzzymatch.
let prefix = document.getText(
new vscode.Range((item.range as vscode.Range).start, position))
if (prefix)
item.filterText = prefix + '_' + item.filterText;
return item;
})
return new vscode.CompletionList(items, /*isIncomplete=*/ true);
},
// VSCode applies fuzzy match only on the symbol name, thus it throws away
// all results if query token is a prefix qualified name.
// By adding the containerName to the symbol name, it prevents VSCode from
Expand Down

0 comments on commit a5ae410

Please sign in to comment.