private static boolean shouldResetIndex(@NotNull VFileEvent event) {
    if (event instanceof VFileContentChangeEvent) return false;
    VirtualFile file = event instanceof VFileCreateEvent create ? create.getParent() : event.getFile();
    return file != null && FileUtil.isAncestor(PathManager.getScratchPath(), file.getPath(), false);
  }
private static boolean shouldResetIndex(@NotNull VFileEvent event)