boolean (@NotNull YAMLKeyValue keyValue, @NotNull PsiElement keySibling) { if (keySibling.getParent() != keyValue) { return false; //assert? } PsiElement key = keyValue.getKey(); for (PsiElement prev = keySibling.getPrevSibling(); prev != null && prev != key; prev = prev.getPrevSibling()) { if (prev.getNode().getElementType() == YAMLTokenTypes.EOL) { return true; } } return false; }