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.
never ask a materialist/idealist what is matter/geist, worst mistake of my life