99% of the time, Materialism means being driven by greed(material wealth), while idealism means being driven by moral principles(ideals). This set of definitions is NOT the one that philosophers used.
Marx and Engels discussed materialism and idealism in philosophy, which is a completely different thing. Even in philosophy, both terms are extremely vague and are not enough to mean anything on their own without pages upon pages of elaboration.
It's laughable how online leftists throw around these words without even knowing what they mean. No, calling something "idealist" is not a valid critique and saying "material conditions" instead of "reality" does not make your argument stronger. Read an actual book for once and never ever use those words again. Save them for serious writing of substance.
One hilarious side effect of this is that some leftists end up thinking that liberals are idealists in the sense that they are driven by moral principles and are convinced that being an idealist is a bad thing.
I'd love to hear what principles you think liberals are driven by
the point is that they don't have principles