To agree with a positive statement we say “SO + AUXILIARY + SUBJECT”
To agree with a negative statement we say “NEITHER + AUXILIARY + SUBJECT”
I use ‘so do I’ to say that a positive sentence is also true for me, and I use ‘neither do I’ to say that a negative sentence is also true for me:
• John: I hate mushrooms.
Me: So do I (I also hate mushrooms).
• Lucy: I don’t live in London.
Me: Neither do I (I also don’t live in London.).
This is often used as a reply to someone else in a conversation, but both sentences can also be said by the same person, and even joined together:
• Me: Elizabeth loves coffee. So do I.
• Me: Harry doesn’t play the piano and neither do I.