From 8da0ca100ac2b082919e47d40af5a2d56d21f1d4 Mon Sep 17 00:00:00 2001 From: Takashi Tamura Date: Sun, 10 Sep 2023 09:18:36 +0900 Subject: [PATCH] fixup! fixup! fixup! Extract AtSuggestionCompleter --- src/providers/atsuggestion.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/providers/atsuggestion.ts b/src/providers/atsuggestion.ts index cb0c41d0..61cc34ee 100644 --- a/src/providers/atsuggestion.ts +++ b/src/providers/atsuggestion.ts @@ -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)