FormattingModel (@NotNull FormattingContext formattingContext) { PsiFile file = formattingContext.getContainingFile(); CodeStyleSettings settings = formattingContext.getCodeStyleSettings(); Block rootBlock = createBlock(new YAMLFormattingContext(settings, file), formattingContext.getNode()); return new DocumentBasedFormattingModel(rootBlock, settings, file); }