Hi JTX,
1. There's no big difference between "How long have you lived here?" (present perfect) and "How long have you been living here?"(present perfect continuous), because they refer to an action that started in the past and continues up to the present. There's no interruption. The second sentence gives more emphasis on the action.
2. "How long did you live there?" is simple past. That means the action is finished, the person no longer lives there.
3. You can use How long+present perfect/present perfect continuous with verbs such as live, work, study with little difference in meaning.
4. You can't use stative verbs (like, own, prefer, hate, love, ecc...) with present perfect continuous.
I hope it helps