private static boolean isWordCompletionDefinitelyEnabled(@NotNull PsiFile file) {
    return (DumbService.isDumb(file.getProject()) &&
            LanguageWordCompletion.INSTANCE.isWordCompletionInDumbModeEnabled(file.getLanguage())) ||
           file instanceof PsiPlainTextFile && file.getViewProvider().getLanguages().size() == 1;
  }
private static boolean isWordCompletionDefinitelyEnabled(@NotNull PsiFile file)