lamarckianism is not nonsense at all. It has been known in microrganisms for at least 30 years and is one of the foundations of molecular biology research.
Plasmids are genetic structures that can be acquired by a bacteria and then passed on to descendants or through the environment to peer organisms. Antibiotic resistance is one of the most common traits passed this way.