// highlighter for outer lang
FileType type = null;
if(project == null || virtualFile == null) {
type = StdFileTypes.PLAIN_TEXT;
} else {
Language language = TemplateDataLanguageMappings.getInstance(project).getMapping(virtualFile);
if(language != null) type = language.getAssociatedFileType();
if(type == null) type = StdFileTypes.HTML;
}
SyntaxHighlighter outerHighlighter = SyntaxHighlighter.PROVIDER.create(type, project, virtualFile);
registerLayer(LatteTokenTypes.HTML_TEXT, new LayerDescriptor(outerHighlighter, ""));