goToDeclarationCommand function

bool goToDeclarationCommand(
  1. dynamic target
)

Command to go to declaration at the current cursor position.

Implementation

bool goToDeclarationCommand(dynamic target) {
  final (state, dispatch) = _extractTarget(target);
  final pos = state.selection.main.head;

  dispatch(state.update([
    TransactionSpec(
      effects: [_triggerDeclarationEffect.of(pos)],
    ),
  ]));

  return true;
}