boolean (@NotNull VirtualFile file) { Language baseLanguage = LanguageUtil.getLanguageForPsi(myProject, file); if (baseLanguage instanceof TemplateLanguage) { FileViewProvider viewProvider = PsiManager.getInstance(myProject).findViewProvider(file); if (viewProvider == null) { return false; } return ContainerUtil.or( viewProvider.getLanguages(), fileLanguage -> ContainerUtil.or(myLanguageMatchers, matcher -> matcher.matchesLanguage(fileLanguage)) ); } else if (baseLanguage != null) { return ContainerUtil.or(myLanguageMatchers, matcher -> matcher.matchesLanguage(baseLanguage)); } else { return false; } }