Materialism is a fundamental philosophical and/or political worldview which has been in constant opposition with that of Metaphysics. Notable materialists include Heraclitus, Francis Bacon, John Locke, Karl Marx, Friedrich Engels, Nikola Tesla, as well as the tradition of Communism (dialectical materialism).
The Ancient Greek philosopher Heraclitus was a dialectical thinker, who was also materialist in his dialectical wisdom. Examples of this materialism are found in key fragments of his works, which are all but lost to time, such as "No man steps in the same river twice; For it's not the same river and he's not the same man." He was the main contender and confuser of Aristotle and Aristotelian metaphysics.
When most people hear "materialism", they immediately associate it with ideas of greed, desire, or overemphasizing the value of physical things or "wealth" in the human experience. However, critique on the overemphasis of the value of "material possessions", which often comes from a spiritual place, is an implicit critique of "vulgar" materialism (as Marx called it). The vulgarity is essentially in this type of materialism's completely one-sided view that physical material reality is all which exists or all that matters for us to concern ourselves with scientifically. However, this ignores the realm of human subjectivity and therefore human self-critique; in which it is not "material reality" or "material externality" which concerns our scientific thought, but the realm of thought itself (viz. Phenomenology, Psychoanalysis) and its unity and conflict, its relationship with our external/material reality.
In attempting to shield pure (vulgar) materialism and accept it into their thought while also acknowledging the metaphysical realm of thought, the mechanical school was founded by Descartes, who completely estranged his materialist physics from his mathematical metaphysics. For this reason, the materialists of the Cartesian school, or the "anti-metaphysicians", looked to the fresh materialism of John Locke, which had just crossed the river from Britain into France coincidentally. Locke's materialism lent itself to the movement of pragmatism on which the American Revolution for independence was founded, which included Thomas Paine and Jean Jacques Rousseau.
Baruch Spinoza had a mechanical metaphysics which incorporated some jibber jabber about free will not existing, which later served as the object of Kant's critique. In this critique, Kant aimed to save the last remnants of metaphysics in his critique of Spinozism. However, he actually created the basis critical foundation for Hegel's dialectical idealism to steel-man idealism once and for all, by starting from scratch with his thought and scientifically developing dialectical idealism. In Kant's valiant effort to preserve metaphysics, he gave Hegel terra firma– or the means to make a fully developed critique of metaphysics.
It wasn't until the dialectical school was revitalized in the West by G.F.W. Hegel around the turn of the 19th century that his "rational kernel" of dialectics, reinverted "as in a camera-obscura" from idealist (metaphysical) back (Heraclitus) into materialist dialectics-- which takes our thoughts and ideas as conditioning external reality as well as external reality conditioning our thoughts and ideas-- that a proper dialectical critique and grounding of materialism in dialectical being was formed. This laid the foundation for the development of Communism as a tradition rooted in and unifying the traditions of Dialectics, science, philosophy, economics, politics, and, of course, materialism. Thus, when Lenin says "You can only become a Communist when you enrich yourself with all the treasures of mankind," he is not only talking about the physical treasures of humanity; paintings, jewelry, ancient artifacts or architecture, machinery; Lenin is including in these treasures different modes of thought, ideas, language, jokes, our spiritual thoughts and feelings-- all of which refer, for Lenin, to the metaphysical treasures of the very experience of living and the social aspect of humanity, which he views as fundamentally materialist.