private static @NotNull String getHeadString(@NotNull InsertionContext context, @NotNull String lookupString) {
    return context.getDocument().getText().substring(0, context.getTailOffset() - lookupString.length());
  }
private static @NotNull String getHeadString(@NotNull InsertionContext context, @NotNull String lookupString)