@Nullable
  private static String getTextWithEnvVarReplacement(@NotNull CompletionParameters parameters) {
    PsiElement original = parameters.getOriginalPosition();
    if (original == null) return null;

    int textLength = parameters.getOffset() - parameters.getPosition().getTextRange().getStartOffset();
    String originalText = original.getText().substring(0, textLength);
    int offset = original.getTextOffset() - 1;

    if (offset < 0) return originalText;

    PsiElement var = getNearestVarIfExist(parameters.getOriginalFile(), offset);
    if (var == null) return originalText;

    String variable = variableText(var);
    String envPath = EnvironmentUtil.getValue(variable);
    return envPath != null
        ? envPath + originalText
        : originalText;
  }
@Nullable
  private static String getTextWithEnvVarReplacement(@NotNull CompletionParameters parameters)