code completion context is only current query

This commit is contained in:
Jan Prochazka
2021-12-12 20:40:15 +01:00
parent 5e5a26ed4d
commit ccb25c9ff0
3 changed files with 13 additions and 3 deletions

View File

@@ -39,7 +39,12 @@
$: effect = useEffect(() => {
const editor = domEditor?.getEditor();
if ($tabVisible && conid && database && !readOnly && editor) {
return mountCodeCompletion({ conid, database, editor });
return mountCodeCompletion({
conid,
database,
editor,
getText: () => domEditor.getCodeCompletionCommandText(),
});
}
return () => {};
});