public static @Nullable Language getFileLanguage(@Nullable VirtualFile file) {
    if (file == null) {
      return null;
    }

    Language language = file instanceof LightVirtualFile ? ((LightVirtualFile)file).getLanguage() : null;
    return language == null ? getFileTypeLanguage(file.getFileType()) : language;
  }
public static @Nullable Language getFileLanguage(@Nullable VirtualFile file)