refactor: pass current token position to auto completers on codemirror

This commit is contained in:
Andrew Bastin
2021-09-08 05:36:46 +05:30
committed by liyasthomas
parent 8d67a0d95f
commit d6e3bd09b4
2 changed files with 14 additions and 5 deletions

View File

@@ -29,5 +29,9 @@ export type Completer = (
/**
* Position where the completer is fired
*/
completePos: { line: number; ch: number }
) => Promise<CompleterResult>
completePos: { line: number; ch: number },
completeTokenLocation: {
start: { line: number; ch: number }
end: { line: number; ch: number }
}
) => Promise<CompleterResult | null>