Skip to content

Commit

Permalink
fixup! fixup! fixup! Extract AtSuggestionCompleter
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuratak committed Sep 10, 2023
1 parent 9e934ba commit 8da0ca1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/providers/atsuggestion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ export class AtSuggestionCompleter implements vscode.CompletionItemProvider {
return this.completion(line, {document, position, token, context})
}

private completion(line: string, args: {document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, context: vscode.CompletionContext}): vscode.CompletionItem[] {
private completion(
line: string,
args: {
document: vscode.TextDocument,
position: vscode.Position,
token: vscode.CancellationToken,
context: vscode.CompletionContext
}
): vscode.CompletionItem[] {
const escapedTriggerCharacter = escapeRegExp(this.triggerCharacter)
const reg = new RegExp(escapedTriggerCharacter + '[^\\\\s]*$')
const result = line.match(reg)
Expand Down

0 comments on commit 8da0ca1

Please sign in to comment.