I had a friend who loved to speak didactically to us. He had gone to a good college and we used to discuss subjects specific to his interests, to relate to him. Then he would interrupt us to offer his opinion.
He was a pedant and we had to pander to him.
Eventually we stopped hanging out with him. We saw him with his girlfriend from time to time at the bars, and then we stopped seeing him altogether. I think we were all the better for it.