boolean (@NotNull PsiElement element) { PsiFile psiFile = element.getContainingFile(); if (psiFile == null) { return false; } Language language = psiFile.getViewProvider().getBaseLanguage(); return language instanceof TemplateLanguage; }