@Override
    public @Nullable FileType detect(@NotNull VirtualFile file, @NotNull ByteSequence firstBytes, @Nullable CharSequence firstCharsIfText) {
      if (firstCharsIfText == null) return null;
      return ProgressManager.getInstance().computeInNonCancelableSection(() -> {
        FileType byName = FileTypeManager.getInstance().getFileTypeByFileName(file.getName());
        RootType rootType = byName != UnknownFileType.INSTANCE ? null : findRootType(file);
        return rootType != null ? PlainTextFileType.INSTANCE : null;
      });
    }
@Override
    public @Nullable FileType detect(@NotNull VirtualFile file, @NotNull ByteSequence firstBytes, @Nullable CharSequence firstCharsIfText)