( position: Position, document: vscode.TextDocument, )
| 114 | * @param document Document to start scanning from, starting at the position (other open documents are scanned from top) |
| 115 | */ |
| 116 | export const getCompletionsForCurrentLine = ( |
| 117 | position: Position, |
| 118 | document: vscode.TextDocument, |
| 119 | ): string[] | null => { |
| 120 | const currentLineText = document.getText( |
| 121 | new vscode.Range(TextEditor.getFirstNonWhitespaceCharOnLine(document, position.line), position), |
| 122 | ); |
| 123 | |
| 124 | return getCompletionsForText(currentLineText, document.fileName, position); |
| 125 | }; |
| 126 | |
| 127 | export const lineCompletionProvider = { |
| 128 | /** |
no test coverage detected