Use Workspace::addOpener
Use Cursor::onDidChangePosition